Steps:
1) Added a node context that contained a user reference field
2) Added a "user from reference" relationship
3) In the modal window, made no changes, just hit "Save"
4) BING, error popup!
Error: An error occurred while attempting to process /drupal-6.2/?q=ctools/context/ajax/add/delegator/relationship/user_view_panel_context/user_from_userref
Additional PHP log error: PHP Fatal error: Cannot access empty property in C:\wamp\www\drupal-6.2\sites\all\modules\cck\modules\userreference\panels\relationships\user_from_userref.inc on line 32
The relationship does not save. If I close the relationship window and immediately attempt to 'continue' in Panels, I get the php error again, but in my browser this time. If I go back, refresh the panel page, and then try continue again, it works.
For further enjoyment:
1) Added a node context that contained a user reference field
2) Hit 'continue' to "save" that context.
3) Back to get back to the contexts page.
4) Attempted to add the user reference. Same error.
5) Refreshed the page.
6) Attempted to edit the context to make sure that the selected NID was saved, and got this error in the ui:
An error occurred while attempting to process /drupal-6.2/?q=ctools/context/ajax/configure/delegator/context/user_view_panel_context/0
The same 'empty property' error appears in the PHP error log.
The 'edit context' modal is um. Toast:) It's hanging there with the 'waiting' spinner. If I choose 'close window', refresh the page, and then try to edit the context again, it opens.
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | 481568-fix-userreference-relationship.patch | 2.28 KB | merlinofchaos |
Comments
Comment #1
yched commentedBumping to Panels queue see if it rings a bell over there.
Comment #2
merlinofchaos commentedHeh, I had her put that in the CTools queue. As near as i can tell for some reason the variable that is *supposed* to hold the uid is appearing to be empty on the node. I don't know if it's because something in CCK has changed since D5 or not; all I did was port the userreference forward from D5.
It is this code that is failing:
Comment #3
yched commentedLol, I didn't notice the OP was esmerel :-)
Hm, the structure of userref values hasn't changed since D5. If $context->data is supposed to contain the context node, then this should provide the uid. You can however, have a case where the node has no value for this field., and this isset() will be FALSE.
Comment #4
merlinofchaos commentedAh interesting. But we're not getting a FALSE we're getting an error because the stuff in the {} evaluates to nothing, I think. Maybe that just needs to be done in two steps. Thanks for the insight.
Comment #5
esmerel commentedI'm crushed. Heartbroken.
OK not really ;)
Comment #6
merlinofchaos commentedSo the whole problem was that the settings form name and function didn't match up, and so the actual field was never being chosen. This fixes that, but won't fix the broken non-data in existing userreferences. I doubt there are any since leaving the relationship in causes whitescreens so nobody would be using it.
Comment #7
merlinofchaos commentedI totally forgot ot bump this back to the right queue!
Comment #8
markus_petrux commentedCatched and committed to CCK2 and CCK3. :)