When attempting to use the relationship setup 'Configure Relationship: Taxonomy term: Representative node' I keep getting errors when trying to save the settings. A dialog pops up when clicking apply…
An AJAX HTTP error occurred.
HTTP Result Code: 500
Debugging information follows.
Path: http://test1/admin/structure/views/ajax/config-item/test/page/relationship/tid_representative
StatusText: Internal Server Error
ResponseText:
…& the following is logged to the Apache error log
PHP Fatal error: Call to undefined method views_handler_relationship_groupwise_max::view_aliased() in (site)/sites/all/modules/views/handlers/views_handler_relationship_groupwise_max.inc on line 200, referer: http://test1/admin/structure/views/view/test/edit?render=overlay
The settings for the handler do get added to the view, but I also get an error in the drupal message area…
Notice: Undefined index: subquery_string in views_handler_relationship_groupwise_max->query() (line 362 of /test1/sites/all/modules/views/handlers/views_handler_relationship_groupwise_max.inc).
SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') = node_taxonomy_term_data.nid LEFT JOIN taxonomy_vocabulary taxonomy_vocabular' at line 1
…with another status message that simply says…
1308858783
I assume this is an out of memory error? I have added
php_value max_execution_time 3000
php_value max_input_time 5000
php_value memory_limit 512M
to the .htaccess, but it still happens.
This is on a fresh installed Drupal 7.2 site with views 7.x-3.x-dev & ctools 7.x-1.x-dev.
I'm using PHP 5.2.14 with Apache/2.2.17, MySQL 5.1.51 on OSX.
To reproduce, create a taxonomy term view & configure it to use a relationship of "Taxonomy term: Representative node" Saving the settings throws the errors mentioned above.
It is not clear if my view is correctly setup, can anyone with a working 'Taxonomy term: Representative node' view post the output of an export & I'll try importing that?
PS My aim is to make a list of terms with one node represented per term.
Comments
Comment #1
joachim CreditAttribution: joachim commentedCan you try git pull so you get http://drupal.org/node/1198156 and apply http://drupal.org/node/1198166 and report back?
Comment #2
drew reece CreditAttribution: drew reece commentedOn my clean drupal 7.2 it worked fine. I must have strict reporting on.
After clearing caches I noticed there is another occurrence of this issue …
I replaced line 152 with the same 'pass $form by reference' …
function options_submit(&$form, &$form_state) {
and it works,
EDIT - I didn't realise the above wasn't in the 7.x-3.0 branch, it is part of the patch 1198166
http://drupal.org/node/1198166
You have no idea how long I have waited for views to 'select a single example from many terms' to be built in :^)
Thank you Joachim & everyone in that huge thread.
Comment #3
joachim CreditAttribution: joachim commentedSo are you now getting any errors at all?
If not, can you close this as 'duplicate' please?
> You have no idea how long I have waited for views to 'select a single example from many terms' to be built in :^)
Hehe :) you're welcome!
Comment #4
drew reece CreditAttribution: drew reece commentedComment #5
joachim CreditAttribution: joachim commentedThat's a relief! Thanks for testing it :)
Comment #6
texas-bronius CreditAttribution: texas-bronius commentedEven after re-applying patches, the magic stroke was to edit the given View and hit Save: voila!
Yes, I tried drush cc all ("as much as twice"), and I tried Clear Views Cache a couple times in case that's what merlin was referring to in the first paragraph of the Views project page.
Love the work here. Hope this helps someone.