Closed (fixed)
Project:
Entity reference
Version:
7.x-1.8
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
23 Mar 2023 at 18:49 UTC
Updated:
28 Apr 2023 at 16:44 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
psaleks commentedComment #3
psaleks commentedComment #4
psaleks commentedProblem with incorrect optimization in EntityReference_SelectionHandler_Views.class.php. v7.x-1.8
line 142
To fix bug replace by code from v7.x-1.6
Comment #5
danyg commentedHere is the patch which fixes this issue.
Comment #6
danyg commentedOk, here is an improved patch for this issue. It now respects if there is more than one bundle are being used in the reference field (like listing all pages and stories)
Comment #7
psaleks commentedPatch from #6 works for me
Comment #8
danyg commented@psaleks Can you set the status to RTBC (Reviewed & tested by the community) if it looks good to you?
Comment #9
leducdubleuet commentedComment #10
eckersley commentedI came here because I had the same problem. Patch #6 fixed it for me too. Thanks!
Comment #11
salag commentedI tried the patch in #6 and got this error:
ParseError: syntax error, unexpected 'if' (T_IF) in _registry_check_code() (line 155 of [website]/sites/all/modules/entityreference/plugins/selection/EntityReference_SelectionHandler_Views.class.php).
Comment #12
psaleks commentedComment #13
danyg commented@SaIAG it's very strange, it looks that applying the patch wasn't successful for you and it caused a parse error.
The error comes from the same file but from an earlier point. Have you already applied a different patch on this module?
Comment #14
joseph.olstadhas anyone tested this patch with PHP 8.1 or PHP 8.2 ?
the count function is more strict since 8.1 and 8.2, just wondering if there's a scenario where
$return[$bundle]
is not countable by PHP 8.1/ PHP 8.2 and the deprecated notice would show up?
Comment #15
psaleks commentedPatch works for php 8.1.12.
Comment #16
salag commented@danyg #13 no, no other patches applied. I tried it once, it failed and I reverted to default module file.
Told the content guy to use intelli-sense on the name, which helps a little. Looking forward to the update.
We're still on php 7.4.33. Don't know if that has anything to do with it.
Comment #17
joseph.olstad@SalAG, sounds like your patching tool might not be working correctly, could you please try modifying the module file manually and please test the changes with PHP 7.4 and then report the results to us?
Comment #18
joseph.olstadComment #20
joseph.olstadComment #21
joseph.olstadhttps://www.drupal.org/project/entityreference/releases/7.x-1.9