Short description of the issue
ProcessPagesExportImport.module fails with Class "ProcessWire\PagesExportImport" not found when opening Pages → Export/Import in the admin. The PagesExportImport.php file is present in /wire/core/Pages/ but the class autoloader does not appear to look inside that subdirectory.
Steps to reproduce
- Fresh install of ProcessWire
- Log in as superuser
- Open Pages → Export/Import in the admin
Expected behavior
The Export/Import page loads.
Actual behavior
A fatal error is thrown:
Class "ProcessWire\PagesExportImport" not found
File: wire/modules/Process/ProcessPagesExportImport/ProcessPagesExportImport.module:58
The offending line is:
$this->exportImport = new PagesExportImport();
Diagnosis
PagesExportImport.php exists in my install at:
wire/core/Pages/PagesExportImport.php
…not at wire/core/PagesExportImport.php. find . -iname 'PagesExportImport.php' confirms it's only in the Pages/ subdirectory.
WireClassLoader resolves other reorganized core classes correctly (the trace shows wire/core/Page/Page.php, wire/core/Template/TemplateFile.php, wire/core/WireHooks/WireHooks.php, wire/core/ProcessController/ProcessController.php all loading fine), so it looks like the Pages/ subdirectory is the one that hasn't been registered with the autoloader yet — or this file shouldn't be in a subfolder at all.
Workaround: moving the file to wire/core/PagesExportImport.php resolves the error.
Environment
- ProcessWire version: 3.0.261
- Branch / commit: dev
- PHP version: 8.5.6
- MySQL / MariaDB version: 11.8.2
- OS: Arch Linux
- Web server: PHP built-in server (
php -S) with custom router.php
- 3rd-party modules potentially related: Tracy Debugger 2.11.2
Stack trace (excerpt)
ProcessPagesExportImport.module:58
→ wire/core/Wire.php:405
→ wire/core/WireHooks/WireHooks.php:1077
→ wire/core/Wire.php:476
→ wire/core/ProcessController/ProcessController.php:364
→ wire/core/admin.php:174
→ site/templates/admin.php:19
→ wire/core/Template/TemplateFile.php:328
→ wire/core/Page/Page.php:3106
→ wire/modules/Process/ProcessPageView.module:195
→ index.php:62
Short description of the issue
ProcessPagesExportImport.modulefails withClass "ProcessWire\PagesExportImport" not foundwhen opening Pages → Export/Import in the admin. ThePagesExportImport.phpfile is present in/wire/core/Pages/but the class autoloader does not appear to look inside that subdirectory.Steps to reproduce
Expected behavior
The Export/Import page loads.
Actual behavior
A fatal error is thrown:
The offending line is:
Diagnosis
PagesExportImport.phpexists in my install at:…not at
wire/core/PagesExportImport.php.find . -iname 'PagesExportImport.php'confirms it's only in thePages/subdirectory.WireClassLoaderresolves other reorganized core classes correctly (the trace showswire/core/Page/Page.php,wire/core/Template/TemplateFile.php,wire/core/WireHooks/WireHooks.php,wire/core/ProcessController/ProcessController.phpall loading fine), so it looks like thePages/subdirectory is the one that hasn't been registered with the autoloader yet — or this file shouldn't be in a subfolder at all.Workaround: moving the file to
wire/core/PagesExportImport.phpresolves the error.Environment
php -S) with custom router.phpStack trace (excerpt)