processwire / processwire-issues

ProcessWire issue reports.
45 stars 2 forks source link

PHP warnings ProcessPageEditLink #1993

Open flipzoom opened 6 days ago

flipzoom commented 6 days ago

Short description of the issue

I don't know if this has already been reported, but in PW Main 3.0.229 The following PHP warning appears within repeaters:

image

ryancramerdesign commented 6 days ago

@flipzoom I can't seem to duplicate it here. Though 3.0.229 is more than a year old, so I'm guessing this has been fixed on the dev branch.

matjazpotocnik commented 5 days ago

@flipzoom the only diff between PW 3.0.218 (just happened to have this version on my computer) and PW 3.0.242 is that the getFilesPage() method is hookable. Could you debug why $page->template->fieldgroup is null?

flipzoom commented 3 days ago

So first of all: the warnings are no longer present in PW 3.0.242.

Out of interest, I have nevertheless debug and checked where the problem comes from. Only in a weird constellation:

This resulted in the warning. Perhaps a check should still be carried out at this point to ensure that Page is not a NullPage, just to avoid such strange constellations in future? What do you think? @matjazpotocnik @ryancramerdesign

flipzoom commented 3 days ago

The scheme again:

matjazpotocnik commented 3 days ago

@flipzoom, thank you! I agree, a check should be carried out.