Content languages in CMS pages are not working for multiligual shop.

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!
Sabir_Ali
Posts: 34
Joined: 12 Feb 2024, 06:43

Content languages in CMS pages are not working for multiligual shop.

Post by Sabir_Ali » 09 Sep 2024, 07:02

PHP: 8.2.7
Laravel Framework: 10.48.4
System: Debian GNU/Linux 12
Aimeos Laravel v2023.10
~~~~~~~~~~~~~~~~~~~~~

Hello!
For using CMS page editor in Admin Panel I installed GrapesJS for our multilingual, single shop system, and added new route into /routes/web.php file by Your documentsation:

Code: Select all

Route::match(['GET', 'POST'], '{locale}/{cmspath?}', '\Aimeos\Shop\Controller\PageController@indexAction')
    ->name('aimeos_page')->where('cmspath', '.*');
Now I try to test /about page content adding by CMS for three languages in Admin Panel. So I use URL /about in Basic settins because page editor has ability to use one URL for different languages. The issue is that such approach doesn't work for me (get 404).

Only when I hard coding URL like /en/about in Basic tab - it works. But in this case, the point of supporting multilingual support in the CMS editor becomes completely meaningless and I will be forced to write content for each URL separately. For example, for /en/about, /ru/about and /az/about.

If it's possible to use multilingual functionality in CMS editor (without duplicate URLs) - what I forgot to do?

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

Re: Content languages in CMS pages are not working for multiligual shop.

Post by aimeos » 10 Sep 2024, 08:18

Sorry, the documentation wasn't up to date, the parameter name must be "path", not "cmspath". This is fixed now in the README: https://github.com/aimeos/ai-cms-grapes ... er#laravel
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Sabir_Ali
Posts: 34
Joined: 12 Feb 2024, 06:43

Re: Content languages in CMS pages are not working for multiligual shop.

Post by Sabir_Ali » 10 Sep 2024, 10:47

Yes! The "path" parameter really works!
I was stuck on it these days!
Thank You very much!

Post Reply