nextdoordigital
New Pleskian
- Server operating system version
- Windows Server 2019
- Plesk version and microupdate number
- 18.0.78 Update #4
When publishing a new Sitejet website, images from collections aren't published.
I found they load through api.php in the sites root directory, with URLs like https://<website name>/api.php/images/1920/2839671/966-920x540.jpg. All images throw a 404 error.
The solution I found is to debug the api.php file that comes with Sitejet manually.
There is a section that says:
$isAllowedGet = $requestMethod === 'GET'
&& preg_match('#^/(form_container|collection|website)/#', $url);
I have added |images to the allowed list, and this fixes the problem. It needs to be done for every site individually, and every time the site gets republished. To avoid this, there is a template file you can edit:
Plesk\admin\plib\modules\plesk-sitejet\resources\templates\api.php.tmpl
If you fix the bug here, you don't need to do it every time you update a Sitejet site.
I hope WebPros will fix the underlying bug soon. Meanwhile, I hope this info might save you some debugging of your own!
Cheers,
Andor
I found they load through api.php in the sites root directory, with URLs like https://<website name>/api.php/images/1920/2839671/966-920x540.jpg. All images throw a 404 error.
The solution I found is to debug the api.php file that comes with Sitejet manually.
There is a section that says:
$isAllowedGet = $requestMethod === 'GET'
&& preg_match('#^/(form_container|collection|website)/#', $url);
I have added |images to the allowed list, and this fixes the problem. It needs to be done for every site individually, and every time the site gets republished. To avoid this, there is a template file you can edit:
Plesk\admin\plib\modules\plesk-sitejet\resources\templates\api.php.tmpl
If you fix the bug here, you don't need to do it every time you update a Sitejet site.
I hope WebPros will fix the underlying bug soon. Meanwhile, I hope this info might save you some debugging of your own!
Cheers,
Andor