When editing an og_group_ref field instance, for example at admin/structure/types/manage/post/fields/og_group_ref, and changing "Groups field settings: Number of values" from "Unlimited" to "1", all node view frontend pages fail with a WSOD until resetting this to "Unlimited" or at least any value ≥2.

In the PHP error log, the following error message appears:

PHP Fatal error: Call to undefined method EntityDrupalWrapper::count() in [docroot]/profiles/commons/themes/commons/commons_origins/template.php on line 1317

There is an unrelated issue #1932510: Fatal error: Call to undefined method EntityDrupalWrapper::count() in /usr/home/deb16445/domains/mikesportel.nl/public_html/fase which had the same error condition in another module, and a patch to solve it. Also there is a possibly related issue in Drupal Commons (#2089693: Call to undefined method EntityDrupalWrapper::count()).

For a workaround to this issue, one can use custom code or Rules to validate the form and limit the number of values to 1, similar to here. This can also be done for just some content types (usually desired), while the "Groups field settings: Number of values" setting applies to all instances of the og_group_ref field, in all the content types (according to a note on the field edit page).

Comments

tanius created an issue. See original summary.

tanius’s picture

Issue summary: View changes