Thanks again for this module and pushing out betas and bug fixes- it's much appreciated.
After a customer bought a classified ad and it was listed on the site, when any anonymous user (but not admin user) clicks on the ad to view it, they are redirected to the shopping cart.
I went to node checkout settings and found this was checked:
Redirect customers to their cart when they try to view a node governed by node checkout.
Users who have "edit node_type content" permission are exempt from this redirect.
So i suppose it "makes sense" this was happening except that the
"edit own classified_ad content permission" is checked for anonymous and authenticated roles
but "edit any classified_ad content permission" is unchecked for anonymous and authenticated roles
which of these permissions is
Users who have "edit node_type content" permission are exempt from this redirect
referring to?
What exactly would be the use case for this checkbox? I'm not sure im' understanding it. Here's what i had THOUGHT it meant...
"Redirect customers to their cart when they try to view a node THEY CREATED governed by node checkout.
Users who have "edit OWN node_type content" permission are exempt from this redirect."
Was i right in my understanding of this and this is a bug... or could this be worded more clearly? Could someone help me understand? Any advice would be greatly appreciated.
My solution for now is to just disable this checkbox, because i'm not sure why i'd want to redirect every anonymous user to the cart when the try to view every node governed by node checkout.
Comments
Comment #1
SchwebDesign commentedby the way, I had previously tweaked my code in:
uc_node_checkout.module
and uc_node_checkout.admin.inc
reference: http://drupal.org/node/1131406#comment-4469666
and function uc_node_checkout_order in uc_node_checkout.module
reference: http://drupal.org/node/889276#comment-4550754
but I'm doubting is is what caused this problem
just trying to get this to work- almost there.
Comment #2
codegrunt commentedVery late comment here but figured it makes sense to post this for posterity.
If anonymous users are redirected to the cart when attempting to view a published node it means that there is a stale cart record in "drupal_uc_cart_products". This usually seems to occur when an order has not made it through to the "completed" stage or skipped the payment stage (depends on how you are handling changing the publish status for purchased nodes).
Another problematic case is where you have an admin user create a node associated with UC Node Checkout. When they create the node, a corresponding product is added to their cart and this causes the above issue.
There are two work arounds I am aware of:
1. use the "create order" process within Ubercart to create the given node and complete the process including whatever conditional action you have setup to publish the node.
This will create the node and trigger the completion conditions that clear the cart and publish the node (assuming you have setup the necessary conditions).
2. manually delete the corresponding drupal_uc_cart_products cart record for the newly added node.
This is a case of grabbing new node's nid and then deleting up the corresponsing cart record that contains it.
Neither options is great but unrolling the code enough to be able to identify the difference between "shopping" and normal editing to fix this is not trivial.
Cheers