-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Infinite loop, caused by changing the method_exists
call on the lumberjack extension
#128
Comments
method_exists
call on the lumberjack extension
To ealisy replicate this issue you can install We've patched out the bug in module version |
Thanks for reporting this. @wernerkrauss |
Ah, that's a pity. I didn't see, that the names are the same and cause this problems. |
I've merged the revertion PR and tagged as 2.3.3 @wernerkrauss yes introducting a new hook such as |
Thanks for the fix all :) |
No worries, thanks for reporting it @erikfrerejean Closing, as the issue is resolved. @wernerkrauss if you want to follow up on the comment above from @emteknetnz please comment about it in your original issue #127 and we can re-ooen that issue for you. |
#125 introduces a breaking change
Because the new
$this->getOwner()->hasMethod('getLumberjackPagesForGridfield')
checks whether the method is defined anywhere on the owner or any of its extensions it will always returntrue
as the\SilverStripe\Lumberjack\Model\Lumberjack
extension itself defines thegetLumberjackPagesForGridfield
method.In the old case when an implementation didn't define the
getLumberjackPagesForGridfield
method itself but used the Lumberjack extension it would fallback to the default behaviour of loading all sitetree items with the current owner as parent id.After the change in #125, when the implementation itself doesn't explicitly define the
getLumberjackPagesForGridfield
method the current codeflow will call itself and cause an infinite loop. We've validated this behavior by replacing the method with the following workaround which brought back the behaviour previously observed.PRs
The text was updated successfully, but these errors were encountered: