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
Multiple repeaters with similar names stored in the viewBag on the page. #4808
Comments
@pkurg Thanks for the report. Confirmed bug. I believe build 460 is now locked, so the fix for this will need to be done in 461. |
Similarly named repeater fields being used in viewBag variables were being assigned aliases which succeeded the `strpos` check on line 407. This will more clearly look for a child repeater form and index. Fixes #4808
@bennothommo you could launch an octodock instance with this PR for testing, I think this should be used for all PRs since it puts everyone on the same environment/libraries for testing. What do you think? |
@mjauvin I believe @LukeTowers has discussed that with @petehalverson as a possible thing to do down the track, but for the moment, I've only been posting links to it very sparingly (generally via DM) as there's no control over what someone may get up to with the instance if it's made public. |
Similarly named repeater fields being used in viewBag variables were being assigned aliases which succeeded the `strpos` check on line 407. This will more clearly look for a child repeater form and index. Fixes #4808
I am trying to add 2 repeaters to the page.
Everything works fine, but if the name of the second viewBag (viewBag [dogy]) starts with the name of the first (viewBag [dog]) we get the error "" Undefined offset: 0 "on line 398 of / srv / www / devv / modules / backend / formwidgets /Repeater.php ".
If you change viewBag [dogy] to viewBag [ddogy], everything starts working fine again.
The error occurs here.
file - /modules/backend/formwidgets/Repeater.php
Screencast -> https://www.youtube.com/watch?v=WrI9OSLTcLo
The text was updated successfully, but these errors were encountered: