processwire / processwire-issues

ProcessWire issue reports.
44 stars 2 forks source link

ProcessPageEdit module fatal error - when trying to edit on admin #1937

Closed sevenstudio closed 4 weeks ago

sevenstudio commented 1 month ago

ProcessWire 3.0.239 PHP 8.1.10

I was testing latest DEV version and while trying to access setup -> configure -> ProcessPageEdit for a edit I'm getting fatal error:

Fatal Error: Uncaught Error: Call to a member function get() on null in \wire\modules\Process\ProcessPageEdit\ProcessPageEdit.module:3476

This is a localhost server where I have few installations based on 3.0.225, no issues there.

matjazpotocnik commented 1 month ago

@sevenstudio, can you edit ProcessPageEdit.module and replace lines 3468-3470:

$config = $this->config;
$pages = $this->pages;
$modules = $this->modules;

with:

$config = $this->wire()->config;
$pages = $this->wire()->pages;
$modules = $this->wire()->modules;
sevenstudio commented 1 month ago

@matjazpotocnik thanks, it works correctly now. I see that older installations were using $this->wire() (at least 3.0.225 that I have on hand), not sure since when this has been changed. Could you please create PR for this?

matjazpotocnik commented 1 month ago

It's changed in this commit

No need for PR, Ryan will fix it soon.

sevenstudio commented 1 month ago

Great, I will close this one in this case. Thanks a lot for your contribution.

matjazpotocnik commented 1 month ago

I reopened it and will close it when it is fixed.

matjazpotocnik commented 4 weeks ago

fixed in https://github.com/processwire/processwire/commit/abe1216c8976444c53018ede024ea6c45c0d3924