CMS pages return 404

Help for integrating the Laravel package
Forum rules
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
snicto
Posts: 37
Joined: 12 Oct 2022, 14:00

CMS pages return 404

Post by snicto » 12 Oct 2022, 14:22

"aimeos/aimeos-laravel": "~2022.07",
"laravel/framework": "^9.2",

Pages created in CMS are not returning appropriate pages via URL. So I have created a "/contacts" page in the CMS section, however, when entering <site>/contacts 404 is returned instead.

Adding the following to web.php routes does display the pages, however, when entering the wrong URL 404 is not displayed, but a blank page is displayed instead.

Code: Select all

Route::match(['GET', 'POST'], '{path?}', '\Aimeos\Shop\Controller\PageController@indexAction')
    ->name('aimeos_page')->where( 'path', '.*' );

User avatar
aimeos
Administrator
Posts: 7915
Joined: 01 Jan 1970, 00:00

Re: CMS pages return 404

Post by aimeos » 12 Oct 2022, 14:56

snicto wrote: 12 Oct 2022, 14:22 Pages created in CMS are not returning appropriate pages via URL. So I have created a "/contacts" page in the CMS section, however, when entering <site>/contacts 404 is returned instead.
By default, the CMS pages are prefixed with "/p" to "/p/contacts" to avoid problems with Laravel auth routes.
snicto wrote: 12 Oct 2022, 14:22 Adding the following to web.php routes does display the pages, however, when entering the wrong URL 404 is not displayed, but a blank page is displayed instead.
The behavior has been improved in the recently released Aimeos 2022.10 LTS version.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

snicto
Posts: 37
Joined: 12 Oct 2022, 14:00

Re: CMS pages return 404

Post by snicto » 12 Oct 2022, 16:19

Upgrading to 2022.10 resolved the issue, thx.

User avatar
VirtualSpy
Advanced
Posts: 122
Joined: 05 Jul 2022, 07:55

Re: CMS pages return 404

Post by VirtualSpy » 13 Oct 2022, 05:12

snicto wrote: 12 Oct 2022, 16:19 Upgrading to 2022.10 resolved the issue, thx.
snicto, may you check , does cms work for multishop in 2022.10 version

snicto
Posts: 37
Joined: 12 Oct 2022, 14:00

Re: CMS pages return 404

Post by snicto » 20 Oct 2022, 15:41

VirtualSpy wrote: 13 Oct 2022, 05:12
snicto wrote: 12 Oct 2022, 16:19 Upgrading to 2022.10 resolved the issue, thx.
snicto, may you check , does cms work for multishop in 2022.10 version
To extent.
If SHOP_MULTILOCALE=0
Everything works as expected.

if SHOP_MULTILOCALE=1
Pages under locales work, say "/en/p/contacts" works
However, default page "/en" is not being displayed, neither if set to a specific language or for all languages.

User avatar
aimeos
Administrator
Posts: 7915
Joined: 01 Jan 1970, 00:00

Re: CMS pages return 404

Post by aimeos » 20 Oct 2022, 15:50

In multi-site/multi-locale setups, CMS content that should be added to shop pages (home page is one of them) need the full URL path in URL field of the CMS page module, e.g. "/en" instead of "/"
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

snicto
Posts: 37
Joined: 12 Oct 2022, 14:00

Re: CMS pages return 404

Post by snicto » 20 Oct 2022, 16:21

aimeos wrote: 20 Oct 2022, 15:50 In multi-site/multi-locale setups, CMS content that should be added to shop pages (home page is one of them) need the full URL path in URL field of the CMS page module, e.g. "/en" instead of "/"
Yes that works, bit confusing tho.

Post Reply