checkout module problem 4.3.0

Burnouts

Joined: 2007-01-31
Posts: 34
Posted: Wed, 2009-12-09 13:30

I've got a small problem with the checkout module,

When ever I update the settings in the admin area under "Checkout Configuration" the settings don't actually don't save. Theres no error message or anything, it just simply loads the data from the database on reload. Nothing has changed in the last 12 months on the server and even then was just to add more ram.

Gallery version = 2.3 core 1.3.0 
API = Core 7.54, Module 3.9, Theme 2.6, Embed 1.5 
PHP version = 5.2.9 cgi 
Webserver = Apache/2.2.11 (Unix) mod_ssl/2.2.11 OpenSSL/0.9.7a mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 mod_jk/1.2.25 
Database = mysqli 5.0.85-community-log, lock.system=flock 
Toolkits = Getid3, LinkItemToolkit, ArchiveUpload, NetPBM, Gd, ImageMagick, Thumbnail 
Acceleration = full/21600, full/21600 
Operating system = Linux
Default theme = matrix 
gettext = disabled 
Locale = en_US 
Browser = Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US) AppleWebKit/532.5 (KHTML, like Gecko) Chrome/4.0.249.30 Safari/532.5 
Rows in GalleryAccessMap table = 51 
Rows in GalleryAccessSubscriberMap table = 8539 
Rows in GalleryUser table = 28 
Rows in GalleryItem table = 8510 
Rows in GalleryAlbumItem table = 54 
Rows in GalleryCacheMap table = 14 

Thanks.

EDIT:

I've just noticed that when a user adds a photo to the cart (not logged in) you receive

Authentication Failure 
Your change cannot be completed due to a loss of session data. Please try again. If it still doesn't work, try logging out and logging back in. 

Back to the Gallery 

But it works fine while the user is logged in, I guess that explains why people are emailing me rather than ordering photos via the website lol.
--
http://Dragpix.net/

 
alecmyers

Joined: 2006-08-01
Posts: 4342
Posted: Wed, 2009-12-09 14:13

Did you use cPanel to install Gallery?

OK, OK, I'll try not to be so mysterious. But please see the following threads which sound like your issue:

http://gallery.menalto.com/node/83962
http://gallery.menalto.com/node/89337

Incidentally, I don't have a problem adding photos to the cart on your website (not logged in, obviously) - can you do some more investigation and try to narrow down the circumstances of your session problem (which might not be checkout related).

 
Burnouts

Joined: 2007-01-31
Posts: 34
Posted: Wed, 2009-12-09 14:30

Hello,

No I didn't use cPanel to install it.

I've turned on debug mode and found this error info on when a guest adds a photo to the cart

Error Detail -
Error (ERROR_REQUEST_FORGED)
in modules/core/classes/GalleryController.class at line 239 (GalleryCoreApi::error) 
in main.php at line 243 (GalleryController::assertIsGenuineRequest) 
in main.php at line 104
in modules/core/classes/GalleryEmbed.class at line 189
in /home/thespudb/public_html/dragpix/gallery.php at line 35 (GalleryEmbed::handleRequest) 

And

Debug Output 
file_exists(/pathremoved/g2data/cache/module/_all/0/0/GalleryFactoryHelper_loadRegistry.inc) file_exists(/path/to/gallery/removed/modules/rewrite/classes/parsers/pathinfo/PathInfoUrlGenerator.class) getParameter cookie.path for core plugin file_exists(/pathremoved/g2data/cache/module/core/0/0/0.inc) getParameter shortUrls for rewrite plugin file_exists(/pathremoved/g2data/cache/module/rewrite/0/0/0.inc) getParameter pathinfo.parser for rewrite plugin getParameter session.lifetime for core plugin getParameter session.inactivityTimeout for core plugin 
--------------------------------------------------------------------------------
(mysqli): SET NAMES "utf8"   
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
(mysqli): SELECT g_Schema.g_info FROM g_PluginMap, g_Schema WHERE g_PluginMap.g_pluginId = g_Schema.g_pluginId AND g_Schema.g_type = 'map' AND g_PluginMap.g_active = 1   
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
(mysqli): SELECT g_userId, g_remoteIdentifier, g_creationTimestamp, g_modificationTimestamp, g_data FROM g_SessionMap WHERE g_id='e724405897e8b74d32bbbad41d32b32c'   
--------------------------------------------------------------------------------
[1260368562] can't guarantee 5 -- extending! file_exists(/pathremoved/g2data/cache/entity/0/0/5.inc) controller checkout.AddToCart, view Loading plugin core Class not defined, trying to include it. file_exists(/path/to/gallery/removed/modules/core/module.inc) core plugin successfully instantiated file_exists(/pathremoved/g2data/versions.dat) file(/pathremoved/g2data/versions.dat, ) Loading plugin checkout Class not defined, trying to include it. file_exists(/path/to/gallery/removed/modules/checkout/module.inc) checkout plugin successfully instantiated Check the version of the checkout plugin file_exists(/pathremoved/g2data/cache/module/_all/0/0/GalleryPluginHelper_fetchPluginStatus.inc) The version of the checkout plugin is ok file_exists(/path/to/gallery/removed/modules/checkout/AddToCart.inc) file_exists(/path/to/gallery/removed/modules/httpauth/module.inc) Loading plugin checkout checkout plugin successfully instantiated Loading plugin favourites Class not defined, trying to include it. file_exists(/path/to/gallery/removed/modules/favourites/module.inc) favourites plugin successfully instantiated getParameter default.theme for core plugin Loading plugin matrix Class not defined, trying to include it. file_exists(/path/to/gallery/removed/themes/matrix/theme.inc) matrix plugin successfully instantiated Check the version of the matrix plugin file_exists(/pathremoved/g2data/cache/theme/_all/0/0/GalleryPluginHelper_fetchPluginStatus.inc) The version of the matrix plugin is ok Loading plugin core core plugin successfully instantiated Check the version of the core plugin The version of the core plugin is ok getParameter smarty.compile_check for core plugin getParameter id.adminGroup for core plugin 
--------------------------------------------------------------------------------
(mysqli): SELECT g_userId FROM g_UserGroupMap WHERE g_userId=5 AND g_groupId=3 LIMIT 1   
--------------------------------------------------------------------------------
realpath(/path/to/gallery/removed/modules/core/classes/../../../) realpath(/path/to/gallery/removed/) file_exists(/home1/thespudb/public_html/dragpix/gallery2/g2data/cache/entity/4/0/40691.inc) 
--------------------------------------------------------------------------------
(mysqli): SELECT g_Group.g_id, g_Group.g_groupName FROM g_UserGroupMap, g_Group WHERE g_Group.g_id = g_UserGroupMap.g_groupId AND g_UserGroupMap.g_userId = 5 ORDER BY g_Group.g_groupName LIMIT 18446744073709551615   
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
(mysqli): SELECT g_module, g_permission, g_description, g_bits, g_flags FROM g_PermissionSetMap   
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
(mysqli): SELECT DISTINCT g_AccessMap.g_accessListId FROM g_AccessMap WHERE g_AccessMap.g_userOrGroupId IN (5,4) AND g_AccessMap.g_permission & 1 = 1   
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
(mysqli): SELECT g_itemId FROM g_AccessSubscriberMap WHERE g_itemId=40691 AND g_accessListId IN (36107,36523,36524,36525,39838) LIMIT 1   
--------------------------------------------------------------------------------
file_exists(/home1/thespudb/public_html/dragpix/gallery2/g2data/cache/entity/4/0/40690.inc) Loading plugin matrix matrix plugin successfully instantiated Check the version of the matrix plugin The version of the matrix plugin is ok file_exists(/home1/thespudb/public_html/dragpix/gallery2/g2data/smarty/templates_c/%%1512405384/matrix) is_dir(/home1/thespudb/public_html/dragpix/gallery2/g2data/smarty/templates_c/%%1512405384/matrix) file_exists(/home1/thespudb/public_html/dragpix/gallery2/g2data/smarty/templates_c/%%1512405384/matrix) is_writeable(/home1/thespudb/public_html/dragpix/gallery2/g2data/smarty/templates_c/%%1512405384/matrix) file_exists(/home1/thespudb/public_html/dragpix/gallery2/g2data/smarty/templates_c/%%1512405384/matrix/v_14) file_exists(/home1/thespudb/public_html/dragpix/gallery2/g2data/cache/theme/_all/localUrlMap.txt) file_exists(/path/to/gallery/removed/lib/javascript/local/BlockToggle.js) file_exists(/path/to/gallery/removed/modules/core/../../themes/matrix/local/theme.css) 

Sorry for the long error code, this is from the admin update page

Array
(
    [g2_return] => /gallery.php?g2_view=core.SiteAdmin&g2_subView=checkout.Admin
    [g2_formUrl] => /gallery.php?g2_view=core.SiteAdmin&g2_subView=checkout.Admin
    [g2_authToken] => 7015448749f5
    [g2_controller] => checkout.Admin
    [g2_form] => Array
        (
            [busname] => 
            [csymbol] => $
            [cformat] => %.2f
            [products] => Array
                (
                    [32297] => Array
                        (
                            [name] => Digital Copy
                            [price] => 5
                            [position] => 1
                            [visible] => true
                            [appliesToItem] => true
                            [chargePostage] => true
                            [showPapers] => true
                            [initialQuantity] => 
                            [quantityLimit] => 
                            [dropdown] => true
                            [description] => Sent via email or download, At dimensions of 3872x2592 without our watermarks.
                        )

                    [25019] => Array
                        (
                            [name] => 6\"x4\"
                            [price] => 5.00
                            [position] => 2
                            [visible] => true
                            [appliesToItem] => true
                            [chargePostage] => true
                            [showPapers] => true
                            [initialQuantity] => 
                            [quantityLimit] => 
                            [dropdown] => true
                            [description] => 
                        )

                    [25020] => Array
                        (
                            [name] => 8\"x10\"
                            [price] => 10.00
                            [position] => 3
                            [visible] => true
                            [appliesToItem] => true
                            [chargePostage] => true
                            [showPapers] => true
                            [initialQuantity] => 
                            [quantityLimit] => 
                            [dropdown] => true
                            [description] => 
                        )

                    [25022] => Array
                        (
                            [name] => 8\"x12\"
                            [price] => 12.00
                            [position] => 4
                            [visible] => true
                            [appliesToItem] => true
                            [chargePostage] => true
                            [initialQuantity] => 
                            [quantityLimit] => 
                            [dropdown] => true
                            [description] => 
                        )

                    [25023] => Array
                        (
                            [name] => 10\"x15\"
                            [price] => 20.00
                            [position] => 5
                            [visible] => true
                            [appliesToItem] => true
                            [chargePostage] => true
                            [showPapers] => true
                            [initialQuantity] => 
                            [quantityLimit] => 
                            [dropdown] => true
                            [description] => 
                        )

                    [25030] => Array
                        (
                            [name] => 11\"x14\"
                            [price] => 20.00
                            [position] => 6
                            [visible] => true
                            [appliesToItem] => true
                            [chargePostage] => true
                            [showPapers] => true
                            [initialQuantity] => 
                            [quantityLimit] => 
                            [dropdown] => true
                            [description] => 
                        )

                    [34102] => Array
                        (
                            [name] => 12\"x16\"
                            [price] => 25.00
                            [position] => 7
                            [visible] => true
                            [appliesToItem] => true
                            [chargePostage] => true
                            [showPapers] => true
                            [initialQuantity] => 
                            [quantityLimit] => 
                            [dropdown] => true
                            [description] => 
                        )

                    [34103] => Array
                        (
                            [name] => 16\"x20\"
                            [price] => 35.00
                            [position] => 8
                            [visible] => true
                            [appliesToItem] => true
                            [chargePostage] => true
                            [showPapers] => true
                            [initialQuantity] => 
                            [quantityLimit] => 
                            [dropdown] => true
                            [description] => 
                        )

                    [34104] => Array
                        (
                            [name] => 20\"x24\"
                            [price] => 45.00
                            [position] => 9
                            [visible] => true
                            [appliesToItem] => true
                            [chargePostage] => true
                            [showPapers] => true
                            [initialQuantity] => 
                            [quantityLimit] => 
                            [dropdown] => true
                            [description] => 
                        )

                    [34105] => Array
                        (
                            [name] => 20\"x30\"
                            [price] => 65.00
                            [position] => 10
                            [visible] => true
                            [appliesToItem] => true
                            [chargePostage] => true
                            [showPapers] => true
                            [initialQuantity] => 
                            [quantityLimit] => 
                            [dropdown] => true
                            [description] => 
                        )

                    [-4] => Array
                        (
                            [name] => 
                            [price] => 
                            [position] => 11
                            [visible] => true
                            [appliesToItem] => true
                            [chargePostage] => true
                            [showPapers] => true
                            [initialQuantity] => 
                            [quantityLimit] => 
                            [description] => 
                        )

                    [-3] => Array
                        (
                            [name] => 
                            [price] => 
                            [position] => 12
                            [visible] => true
                            [appliesToItem] => true
                            [chargePostage] => true
                            [showPapers] => true
                            [initialQuantity] => 
                            [quantityLimit] => 
                            [description] => 
                        )

                    [-2] => Array
                        (
                            [name] => 
                            [price] => 
                            [position] => 13
                            [visible] => true
                            [appliesToItem] => true
                            [chargePostage] => true
                            [showPapers] => true
                            [initialQuantity] => 
                            [quantityLimit] => 
                            [description] => 
                        )

                    [-1] => Array
                        (
                            [name] => 
                            [price] => 
                            [position] => 14
                            [visible] => true
                            [appliesToItem] => true
                            [chargePostage] => true
                            [showPapers] => true
                            [initialQuantity] => 
                            [quantityLimit] => 
                            [description] => 
                        )

                )

            [customPrices] => on
            [papers] => Array
                (
                    [0] => matt
                    [1] => gloss
                    [2] => 
                    [3] => 
                )

            [postages] => Array
                (
                    [0] => Array
                        (
                            [type] => Regular Parcel
                            [price] => 15
                        )

                    [1] => Array
                        (
                            [type] => 
                            [price] => 
                        )

                    [2] => Array
                        (
                            [type] => 
                            [price] => 
                        )

                    [3] => Array
                        (
                            [type] => 
                            [price] => 
                        )

                )

            [discounts] => Array
                (
                    [-2] => Array
                        (
                            [description] => 
                            [priority] => 0
                            [entryCode] => 
                            [minValue] => 
                            [minItems] => 
                            [minProducts] => 
                            [groupId] => 4
                            [discountPercent] => 
                            [discountFixed] => 
                        )

                    [-1] => Array
                        (
                            [description] => 
                            [priority] => 1
                            [entryCode] => 
                            [minValue] => 
                            [minItems] => 
                            [minProducts] => 
                            [groupId] => 4
                            [discountPercent] => 
                            [discountFixed] => 
                        )

                )

            [cartredirect] => on
            [TandCLink] => 
            [carttext] => 
            [alwaysShowAddToCart] => on
            [deleteOrphanDays] => 50
            [deleteAllDays] => 50
            [emails] => Array
                (
                    [0] => Array
                        (
                            [toAddress] => 1
                            [showContents] => 1
                            [showThumbs] => 1
                            [showLinks] => 1
                        )

                    [1] => Array
                        (
                            [toAddress] => removed
                            [showCustomer] => 1
                            [showContents] => 1
                        )

                )

        )

)

EDIT:
Going thru the array of data above shows that the data im editing/adding is the right data i entered but it doesnt go into the db..

--
http://Dragpix.net/

 
alecmyers

Joined: 2006-08-01
Posts: 4342
Posted: Wed, 2009-12-09 14:52

Yes, I'm afraid it is the form truncation problem. The end of the form should have an [action] field with "save" in it; the fact that it's missing is, as best as I can determine, a bug in php or Apache.

If you delete items from the end of the products list you will shorten the form a) get the action field back - feel free to check - and (therefore) b) be able to save the configuration details again.

In the long term the only solution reported by users appears to have been to change hosting providers.

I would also suspect that the same problem would appear with customers trying to place long orders; the form truncation appears to happen after precisely 100 form fields, and an order for many photographs would involve returning a form of more than 100 fields, also with the action field "continue to checkout" at the end of the form.

The error information you post doesn't reveal anything further than the "Authentication failure" message. As I said, though, I, as a guest, don't have any problems adding photos to your cart (I've just checked again) so there is some investigation for you to do there to narrow down which guests' systems do or don't see this problem.

As a bit of background - requests to gallery Controller-type urls need to be accompanied by an AUTHTOKEN in the url or form data, the absence of which triggers an automatic authentication failure message. This is a protection against session hijacking attacks. It's feasible that that same problem that's causing your inability to save the config details (form truncation) is truncating the AUTHTOKEN from another form but this would depend on the layout and length of the form/page which is generating the error.

 
Burnouts

Joined: 2007-01-31
Posts: 34
Posted: Wed, 2009-12-09 16:21

I use Google Chrome will my main browser atm, I use IE8/Firefox to test layout issues etc (on same PC). It sometimes works in IE/FF and sometimes doesn't, even on the same photos. So I don't actually have a clue what it could be. Hopefully G3 isn't too far away..

I'll keep looking into it, thanks for the detailed post alecmyers

--
http://Dragpix.net/