Attention [checkout] users: version 0.4.2 beta

alecmyers

Joined: 2006-08-01
Posts: 4342
Posted: Thu, 2008-12-11 11:50

@maiaradis: please *don't* ask the same question in more than one thread. It's not necessary. Thanks.

 
paulcobb

Joined: 2006-05-04
Posts: 122
Posted: Thu, 2008-12-11 12:15

Regarding the creation of Transaction IDs which are now visible via the 'Show current sessions' option.
It would seem that the ID is created when the user goes to the enter details page (I'm looking at checkoutemail so not sure about checkoutpaypal. Is this correct and what happens, if anything, when the user actually enters and confirms the details?

 
alecmyers

Joined: 2006-08-01
Posts: 4342
Posted: Thu, 2008-12-11 14:34

Paul,

The transaction ID visible in the Sessions page is misleading - it doesn't refer to a transaction that (necessarily) represents the current contents of the cart.

What happens is this: whenever a transaction is created (which, as always, is whenever the user goes to the Confirm page) the number of that transaction is stored, for reference, in the session. So the transanctionId in a given session refers only to the last time that user visited the Confirm page. They may have gone on to complete and pay for that transaction - in which case the cart contents will be emptied and the TransactionId will be the number of that order - or they might have added stuff to the cart - in which case the transaction with that id will be out of date and orphaned.

 
Dirkii

Joined: 2008-01-16
Posts: 214
Posted: Sun, 2008-12-14 01:17

Hallo Alec,

Would be very glad about your help.

When I as a customer or as admin click “Add album to Cart” (with some other albums it works) a page is shown which shows “Security Violation” and "The action you attempted is not permitted."

The permissions should be set right, I cleared cache a few times without success.

Here is what I get in debugging modus (attached .txt file and smarty_debug_console.jpg screenshot):

Debug Output 
file_exists(/www/htdocs/t3368ea7//g2data/cache/module/_all/0/0/GalleryFactoryHelper_loadRegistry.inc) Unimplemented: GalleryUrlGenerator getParameter language.useBrowserPref for core plugin file_exists(/www/htdocs/t3368ea7//g2data/cache/module/core/0/0/0.inc) getParameter default.language for core plugin controller checkout.AddToCart, view Loading plugin core Class not defined, trying to include it. file_exists(/www/htdocs/t3368ea7/modules/core/module.inc) core plugin successfully instantiated file_exists(/www/htdocs/t3368ea7//g2data/versions.dat) file(/www/htdocs/t3368ea7//g2data/versions.dat, ) file_exists(/www/htdocs/t3368ea7/modules/httpauth/classes/HttpAuthPlugin.class) file_exists(/www/htdocs/t3368ea7//g2data/cache/module/httpauth/0/0/0.inc) getParameter id.anonymousUser for core plugin [1229215194] can't guarantee 5 -- extending! file_exists(/www/htdocs/t3368ea7//g2data/cache/entity/0/0/5.inc) Loading plugin checkout Class not defined, trying to include it. file_exists(/www/htdocs/t3368ea7/modules/checkout/module.inc) checkout plugin successfully instantiated Check the version of the checkout plugin file_exists(/www/htdocs/t3368ea7//g2data/cache/module/_all/0/0/GalleryPluginHelper_fetchPluginStatus.inc) The version of the checkout plugin is ok file_exists(/www/htdocs/t3368ea7/modules/checkout/AddToCart.inc) getParameter treatAlbumAsCollection for checkout plugin file_exists(/www/htdocs/t3368ea7//g2data/cache/module/checkout/0/0/0.inc) file_exists(/www/htdocs/t3368ea7//g2data/cache/entity/0/0/7.inc) 
 
(mysqli): SET NAMES "utf8"   
 
 
(mysqli): SELECT g2_Group.g_id, g2_Group.g_groupName FROM g2_UserGroupMap, g2_Group WHERE g2_Group.g_id = g2_UserGroupMap.g_groupId AND g2_UserGroupMap.g_userId = 5 ORDER BY g2_Group.g_groupName LIMIT 18446744073709551615   
 
 
(mysqli): SELECT g2_Schema.g_info FROM g2_PluginMap, g2_Schema WHERE g2_PluginMap.g_pluginId = g2_Schema.g_pluginId AND g2_Schema.g_type = 'map' AND g2_PluginMap.g_active = 1   
 
 
(mysqli): SELECT g_module, g_permission, g_description, g_bits, g_flags FROM g2_PermissionSetMap   
 
 
(mysqli): SELECT DISTINCT g2_AccessMap.g_accessListId FROM g2_AccessMap WHERE g2_AccessMap.g_userOrGroupId IN (5,4) AND g2_AccessMap.g_permission & 65536 = 65536   
 
 
(mysqli): SELECT g_itemId FROM g2_AccessSubscriberMap WHERE g_itemId=7 AND g_accessListId IN (83,84) LIMIT 1   
 
getParameter default.orderBy for core plugin getParameter default.orderDirection for core plugin 
 
(mysqli): SELECT DISTINCT g2_AccessMap.g_accessListId FROM g2_AccessMap WHERE g2_AccessMap.g_userOrGroupId IN (5,4) AND g2_AccessMap.g_permission & 1 = 1   
 
 
(mysqli): SELECT g2_ChildEntity.g_id, g2_ItemAttributesMap.g_orderWeight FROM g2_ChildEntity INNER JOIN g2_ItemAttributesMap ON g2_ChildEntity.g_id = g2_ItemAttributesMap.g_itemId INNER JOIN g2_DataItem ON g2_ChildEntity.g_id = g2_DataItem.g_id INNER JOIN g2_AccessSubscriberMap ON g2_ChildEntity.g_id = g2_AccessSubscriberMap.g_itemId WHERE g2_ChildEntity.g_parentId = 7 AND g2_AccessSubscriberMap.g_accessListId IN (83,84) ORDER BY g2_ItemAttributesMap.g_orderWeight, g2_ChildEntity.g_id LIMIT 18446744073709551615   
 
getParameter id.adminGroup for core plugin 
 
(mysqli): SELECT g_userId FROM g2_UserGroupMap WHERE g_userId=5 AND g_groupId=3 LIMIT 1   
 
file_exists(/www/htdocs/t3368ea7/modules/httpauth/module.inc) Loading plugin checkout checkout plugin successfully instantiated getParameter default.theme for core plugin Loading plugin ice Class not defined, trying to include it. file_exists(/www/htdocs/t3368ea7/themes/ice/theme.inc) ice plugin successfully instantiated Check the version of the ice plugin file_exists(/www/htdocs/t3368ea7//g2data/cache/theme/_all/0/0/GalleryPluginHelper_fetchPluginStatus.inc) The version of the ice 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 realpath(/www/htdocs/t3368ea7/modules/core/classes/../../../) realpath(/www/htdocs/t3368ea7/) 
 
(mysqli): SELECT g_itemId FROM g2_AccessSubscriberMap WHERE g_itemId=7 AND g_accessListId IN (83,84) LIMIT 1   
 
getParameter default.theme for core plugin Loading plugin ice ice plugin successfully instantiated Check the version of the ice plugin The version of the ice plugin is ok file_exists(/www/htdocs/t3368ea7//g2data/smarty/templates_c/%%3169915832/ice) is_dir(/www/htdocs/t3368ea7//g2data/smarty/templates_c/%%3169915832/ice) file_exists(/www/htdocs/t3368ea7//g2data/smarty/templates_c/%%3169915832/ice) is_writeable(/www/htdocs/t3368ea7//g2data/smarty/templates_c/%%3169915832/ice) file_exists(/www/htdocs/t3368ea7//g2data/smarty/templates_c/%%3169915832/ice/v_14) file_exists(/www/htdocs/t3368ea7//g2data/cache/theme/_all/localUrlMap.txt) file_exists(/www/htdocs/t3368ea7/lib/javascript/local/BlockToggle.js) file_exists(/www/htdocs/t3368ea7/modules/core/../../themes/ice/local/theme.css) 

Nice greetings, Dirk.

 
alecmyers

Joined: 2006-08-01
Posts: 4342
Posted: Sun, 2008-12-14 12:58

HI Dirk

If it works for some albums, you need to investigate to find out which item(s) in the albums for which it doesn't work is causing the error. Pick an album for which it doesn't work, and remove items one-by-one until it works again. Then investigate the last item you removed.

 
Dirkii

Joined: 2008-01-16
Posts: 214
Posted: Sun, 2008-12-14 14:49

Thank you very much for your help Alec,

I did: all single photos can be added to the cart properly as it seems. The violation seems to occur only, when trying to add albums containing one album at least, not when adding single photos. Trying to add the root album causes a "Security Violation", others also obviously. Trying to add this album (having no sub albums) from here - http://www.die-fotogalerie.eu/main.php?g2_itemId=43 – causes a security violation. Adding it on this page - http://www.die-fotogalerie.eu/main.php?g2_itemId=45 – works, so all three photos are added to the cart properly when adding the album from here.

The log in the admin section, "Event Logs" shows this (clicking on "ERROR_BAD_PARAMETER" does not open anything):

Letzte Ereignisse
Datum Typ Ort Client Zusammenfassung
So 14 Dez 2008 12:27:46 CET Gallery Error Link 78.54.33.211 ERROR_BAD_PARAMETER
So 14 Dez 2008 12:26:14 CET Gallery Error Link 78.54.33.211 ERROR_BAD_PARAMETER
So 14 Dez 2008 12:26:08 CET Gallery Error Link 78.54.33.211 ERROR_BAD_PARAMETER
So 14 Dez 2008 12:25:37 CET Gallery Error Link 78.54.33.211 ERROR_BAD_PARAMETER
So 14 Dez 2008 12:25:28 CET Gallery Error Link 78.54.33.211 ERROR_BAD_PARAMETER
So 14 Dez 2008 12:25:06 CET Gallery Error Link 78.54.33.211 ERROR_BAD_PARAMETER
So 14 Dez 2008 12:24:51 CET Gallery Error Link 78.54.33.211 ERROR_BAD_PARAMETER
So 14 Dez 2008 12:23:17 CET Gallery Error Link 78.54.33.211 ERROR_BAD_PARAMETER
So 14 Dez 2008 12:17:12 CET Gallery Error Link 78.54.33.211 ERROR_BAD_PARAMETER
So 14 Dez 2008 10:45:17 CET Gallery Error Link 78.54.33.211 ERROR_BAD_PARAMETER
So 14 Dez 2008 02:21:31 CET Gallery Error Link 85.183.159.92 ERROR_BAD_PARAMETER
So 14 Dez 2008 02:21:08 CET Gallery Error Link 85.183.159.92 ERROR_BAD_PARAMETER
So 14 Dez 2008 02:19:17 CET Gallery Error Link 85.183.159.92 ERROR_BAD_PARAMETER
So 14 Dez 2008 01:39:55 CET Gallery Error Link 85.183.159.92 ERROR_BAD_PARAMETER
So 14 Dez 2008 01:28:53 CET Gallery Error Link 85.183.159.92 ERROR_BAD_PARAMETER
So 14 Dez 2008 01:12:25 CET Gallery Error Link 85.183.159.92 ERROR_BAD_PARAMETER
So 14 Dez 2008 01:11:43 CET Gallery Error Link 85.183.159.92 ERROR_BAD_PARAMETER
So 14 Dez 2008 01:11:33 CET Gallery Error Link 85.183.159.92 ERROR_BAD_PARAMETER
So 14 Dez 2008 01:11:24 CET Gallery Error Link 85.183.159.92 ERROR_BAD_PARAMETER
So 14 Dez 2008 01:10:48 CET Gallery Error Link 85.183.159.92 ERROR_BAD_PARAMETER
Seite 1 von 3 « Zurück Vorwärts »

Nice greetings, Dirk.

---------------------------
www.galerie-der-fotos.de

 
alecmyers

Joined: 2006-08-01
Posts: 4342
Posted: Sun, 2008-12-14 15:02

If you're logged in as an admin, the error page that says "Security Violation" should also give you a stack trace with the line numbers of execution: can you post it please?

 
Dirkii

Joined: 2008-01-16
Posts: 214
Posted: Sun, 2008-12-14 15:14

Yes, sorry, I have forgotten to post it:

The action you attempted is not permitted.

Back to the Gallery
Error Detail -
Error (ERROR_BAD_PARAMETER)

* in modules/core/classes/helpers/GalleryEntityHelper_simple.class at line 39 (GalleryCoreApi::error)
* in modules/core/classes/GalleryCoreApi.class at line 2361 (GalleryEntityHelper_simple::loadEntitiesById)
* in modules/checkout/AddToCart.inc at line 88 (GalleryCoreApi::loadEntitiesById)
* in main.php at line 250 (AddToCartController::handleRequest)
* in main.php at line 104
* in main.php at line 88

System Information
Gallery version 2.3
PHP version 5.2.6 apache2handler
Webserver Apache
Database mysqli 5.0.51a-community-log
Toolkits Thumbnail, Gd
Operating system Linux dd5036 2.6.24.4-nmm2 #2 SMP Tue Apr 15 18:13:27 CEST 2008 i686
Browser Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.9.0.4) Gecko/2008102920 Firefox/3.0.4

 
alecmyers

Joined: 2006-08-01
Posts: 4342
Posted: Sun, 2008-12-14 15:27

Looks like the error is caused by trying to add an album which doesn't directly contain any photos.

There should probably be a better error message - I'll add something in for the next version. Thanks.

 
Dirkii

Joined: 2008-01-16
Posts: 214
Posted: Sun, 2008-12-14 15:52

Thank you Alec,

The error messages I have posted are all I have got, unfortunately, respectively I would not know how to generate more or other ones.

I have seen some other websites using "checkout" with the same behavior.

Have you any idea, what I could do currently to passably avoid this error?

Many thanks, nice greetings, Dirk.

---------------------------
www.galerie-der-fotos.de

 
alecmyers

Joined: 2006-08-01
Posts: 4342
Posted: Sun, 2008-12-14 15:59
Quote:
Have you any idea, what I could do currently to passably avoid this error?

Yes... don't switch on the "add album to cart" permission for albums that don't contain any photos.

 
Dirkii

Joined: 2008-01-16
Posts: 214
Posted: Sun, 2008-12-14 16:35

Many thanks for your good idea and your help, Alec,

Nice greetings, Dirk.

---------------------------
www.galerie-der-fotos.de

 
paulcobb

Joined: 2006-05-04
Posts: 122
Posted: Wed, 2008-12-24 15:25

I have noticed a few orders coming through where odd items were not showing a paper type selection on the order.
I think I have replicated what is happening.
If you select an option from the drop-down list then assign a quantity, then next click 'continue to checkout' rather than 'save changes', the item selected does not have a paper option, as the paper options do not appear until you 'save changes'.
Is this valid Alec?

 
alecmyers

Joined: 2006-08-01
Posts: 4342
Posted: Wed, 2008-12-24 15:37

Yes, well spotted. What to do, what to do...

 
paulcobb

Joined: 2006-05-04
Posts: 122
Posted: Wed, 2008-12-24 15:44

Maybe force a 'save changes' before enabling 'continue to checkout'?

 
alecmyers

Joined: 2006-08-01
Posts: 4342
Posted: Wed, 2008-12-24 15:50
Quote:
Maybe force a 'save changes' before enabling 'continue to checkout'?

Not so obvious when you've actually changed something that needs saving.

Will probably have to parse the cart contents to make sure that everything that should have a paper selection does, and if not return to the same page - similar to as if you hadn't selected a postage option when one is required.

Just out of interest, the next version of checkout includes 'accessory' items, and also banded postage - postage can be increased for heavier or larger items.

EDIT: or just default to the first paper option.

 
paulcobb

Joined: 2006-05-04
Posts: 122
Posted: Wed, 2008-12-24 16:07

The parsing option is a cleaner option I think making the user aware that they have to do something - but I guess it means a lot more work ?

Edit - As you probably aware, if you return from the checkout page to the order page by using 'modify order', the relevant paper choices do then appear.

 
alecmyers

Joined: 2006-08-01
Posts: 4342
Posted: Wed, 2008-12-24 16:09

It's not that it's more work - I'm not lazy - but the radio-button choice doesn't permit, semantically, any way to express a "you must pick one of these, you've not made a choice yet" as one radio button is always pressed.

Therefore redirecting the user back to the same page and saying "you haven't picked a paper-type yet - please choose one", when the first option appears as already chosen makes no sense.

Maybe we should drop radio-buttons in favour of a drop-down, for which the first item can always be "(please select)" - that way there's no default paper type, ever.

 
paulcobb

Joined: 2006-05-04
Posts: 122
Posted: Wed, 2008-12-24 16:16
Quote:
Maybe we should drop radio-buttons in favour of a drop-down, for which the first item can always be "(please select)"

Actually I think that would be a good solution

 
alecmyers

Joined: 2006-08-01
Posts: 4342
Posted: Wed, 2008-12-24 17:33
Quote:
Actually I think that would be a good solution

OK, that's done, with associated error messages if you try to checkout without setting paper settings etc.
It will be in version 4.3.

 
alecmyers

Joined: 2006-08-01
Posts: 4342
Posted: Fri, 2008-12-26 22:49

I've tried the drop-down for selecting paper types, and to me it just looks ... wrong. So I've reverted to radio buttons. But it turns out the only difference is in the template, so if anyone's mad keen on a dropdown instead they can change it.

I've also implemented different papertype sets - so you can have the customer choose from, say, {gloss, matt, lustre} for some products, and {silver, gold, black, beech} for other products for examples.

 
alecmyers

Joined: 2006-08-01
Posts: 4342
Posted: Sat, 2008-12-27 12:03

Checkout 0.4.3 beta now here: http://gallery.menalto.com/node/84520