Anonymous vs User Site Display

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!
BrianMecler
Posts: 41
Joined: 03 Jun 2023, 17:30

Anonymous vs User Site Display

Post by BrianMecler » 03 Jun 2023, 18:17

Hello,

Laravel Framework 10.13.1, php8.1-fpm, aimeos/aimeos-laravel 2023.04.2

I am testing out Aimeos and cant figure out the behavior I am seeing.
From the backend (mydomain.com/admin) I customized the page at '/' using the 'CMS' tool.

On the frontend (mydomain.com/) I only see the customization to the page when logged in as a user. When I log out (ie: pretty much every ones view from the outside world) I see what appears to still be the default demo store page.

I have skimmed over the documentation several times over the last few days. Is this the expected behavior? Two different displays of '/' depending on if you are logged in/out?

I have these multishop and multilocales disabled:

SHOP_MULTILOCALE=false
SHOP_MULTISHOP=false
SHOP_REGISTRATION=false
SHOP_PERMISSION=admin

Some other customizations which may or may not be impacting this:

1) I generated an extension and copied the zip file for it into:
/var/www/html/packages/<my-ext-name>

2) I copied the default theme into my own theme:
cp -R /var/www/html/public/vendor/shop/themes/default /var/www/html/packages/<my-ext-name>/themes/client/html/<my-theme-name>

3) I copied the template header into my extensions folder here:
/var/www/html/packages/mectech/templates/client/html/cms/page/header.php
(This is how I added my Google Analytics tag into this file.. was there a more optimal place to do this at?)

Any help would be appreciated.

BrianMecler
Posts: 41
Joined: 03 Jun 2023, 17:30

Re: Anonymous vs User Site Display

Post by BrianMecler » 03 Jun 2023, 22:41

Maybe I am misunderstanding the concept here.

I just did a fresh install, went strait to admin > cms > '/' and modified the default content.

I see the change when logged in on the front end, but the changes are not on the front end when im logged out...

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

Re: Anonymous vs User Site Display

Post by aimeos » 04 Jun 2023, 08:35

This looks like a caching issue. What happens if you force the browser to reload the page (Ctrl+Shift+R)?
If that doesn't help, try to clear the content cache using:

Code: Select all

php artisan aimeos:clear
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

BrianMecler
Posts: 41
Joined: 03 Jun 2023, 17:30

Re: Anonymous vs User Site Display

Post by BrianMecler » 04 Jun 2023, 12:39

Thank you Aimeos,

I had tried 'php artisan aimeos:clear' along with several other cache clearing commands like 'route:clear', 'view:clear'. I tried ctrl + shift + r and new private browsing windows. Restarting php-fpm to clear opcache.

I was using NGINX + PHP-FPM.

As a test, I switched to Apache2 + PHP. I exhibited the same issue, but with this configuration 'php artisan aimeos:clear' fixes the problem. Perhaps there is another level of caching with NGINX + PHP-FPM that I am not aware of...

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

Re: Anonymous vs User Site Display

Post by aimeos » 04 Jun 2023, 17:03

Normally not. We are using Nginx + PHP FPM for all our demo sites.

The difference when being logged in is that the Aimeos content cache isn't used. For testing, you can also delete the content of the madmin_cache table if "php artisan aimeos:clear" didn't remove the entries for whatever reason. There's also a config setting for disabling content caching in ./config/shop.php:
https://github.com/aimeos/aimeos/blob/m ... p.php#L196
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply