processwire-issues icon indicating copy to clipboard operation
processwire-issues copied to clipboard

3.0.237+ breaks single image field in repeater matrix field

Open adrianbj opened this issue 1 year ago • 0 comments

Short description of the issue

I get a Call to a member function path() on null error when saving a page that has a RM field with a single image field (no problem with a multiple images field).

Expected behavior

No error

Actual behavior

I get the mentioned error and the page fails to save.

Optional: Screenshots/Links that demonstrate the issue

image

Optional: Suggestion for a possible fix

I first noticed this on 3.0.241 but worked my way back to 3.0.236 where there is no bug. It is first seen in 3.0.237.

Not sure if it's somehow related but sometimes I get this error which might be the root cause?

[Can’t save page (id=31847): /admin/repeaters/for-field-185/for-page-31825/1727140428-1026-1/: Call $page->of(false); before getting/setting values that will be modified and saved. [body] (in /wire/core/PagesEditor.php line 470)

Steps to reproduce the issue

I can reproduce this on the same site on multiple servers, but struggling to reproduce on a clean install, but it is always resolved when I revert to 3.0.236 so there is definitely something going on. There were a lot of commits between 3.0.236 and 3.0.237 but I haven't managed to narrow down which one is to blame yet but I can go through them one by one if you can't figure out the cause.

adrianbj avatar Sep 24 '24 01:09 adrianbj