Short description of the issue
Commit 650473fa updated most usages to access PagesExportImport via $pages->porter(), but two direct new PagesExportImport() instantiations remain at lines ~1090 and ~1139 of ProcessPagesExportImport.module. With PagesExportImport moved to wire/core/Pages/ (commit 2c064268) and the Pages class-loader prefix commented out (commit fcce89d5), those new calls only succeed if a prior code path called $pages->porter() (which calls require_once).
Expected behavior
new PagesExportImport() succeeds without prerequisites — the class is autoloaded normally.
Actual behavior
In wire/modules/Process/ProcessPagesExportImport/ProcessPagesExportImport.module:
- Lines ~1090 and ~1139 still do
new PagesExportImport(...) directly.
- The class file is at
wire/core/Pages/PagesExportImport.php but is not registered in WireClassLoader/classes.php.
- Normal request flow hits
___execute() at line 58, which calls $pages->porter() first and requires the file — so the regular flow works. Any code path that hits the affected methods without going through ___execute() fails to autoload.
See related: issue #2214.
Optional: Suggestion for a possible fix
Add the entry to the class loader:
// wire/core/WireClassLoader/classes.php
'PagesExportImport' => 'Pages/',
Or replace the two direct new calls with $this->wire()->pages->porter().
Setup/Environment
- ProcessWire version:
dev @ 15c749ed
- File:
wire/modules/Process/ProcessPagesExportImport/ProcessPagesExportImport.module lines ~1090, ~1139
- Related commits: 650473fa, 2c064268, fcce89d5
Short description of the issue
Commit 650473fa updated most usages to access
PagesExportImportvia$pages->porter(), but two directnew PagesExportImport()instantiations remain at lines ~1090 and ~1139 ofProcessPagesExportImport.module. WithPagesExportImportmoved towire/core/Pages/(commit 2c064268) and thePagesclass-loader prefix commented out (commit fcce89d5), thosenewcalls only succeed if a prior code path called$pages->porter()(which callsrequire_once).Expected behavior
new PagesExportImport()succeeds without prerequisites — the class is autoloaded normally.Actual behavior
In
wire/modules/Process/ProcessPagesExportImport/ProcessPagesExportImport.module:new PagesExportImport(...)directly.wire/core/Pages/PagesExportImport.phpbut is not registered inWireClassLoader/classes.php.___execute()at line 58, which calls$pages->porter()first and requires the file — so the regular flow works. Any code path that hits the affected methods without going through___execute()fails to autoload.See related: issue #2214.
Optional: Suggestion for a possible fix
Add the entry to the class loader:
Or replace the two direct
newcalls with$this->wire()->pages->porter().Setup/Environment
dev@15c749edwire/modules/Process/ProcessPagesExportImport/ProcessPagesExportImport.modulelines ~1090, ~1139