Page 1 of 1

When logged in Images are visible, when logged out, they disappear

Posted: Wed Feb 21, 2024 2:05 pm
by caigner
Hi!

Currently I experience a very strange problem. When I am logged in, the texts and images which I entered in the content editor are visible on the webpage. When I log out they vanish. They are no longer in the code.

This is my template code:

Code: Select all

{content block="tile1_text" label="Text for Tile 1" assign="text1"}
{content block="tile3_text" label="Text for Tile 3" assign="text2"}
{content block="tile5_text" label="Text for Tile 5" assign="text3"}

{content_image block='Picture for Tile 2' dir='images/Gallery' assign="picture1"}
{content_image block='Picture for Tile 4' dir='images/Gallery' assign="picture2"}
{content_image block='Picture for Tile 6' dir='images/Gallery' assign="picture3"}

<section>
    <div class="grid tiles">
        <div class="grid tile tile-text">{$text1}</div>
        <div class="grid tile tile-img">{$picture1}</div>
        <div class="grid tile tile-text">{$text2}</div>
        <div class="grid tile tile-img">{$picture2}</div>
        <div class="grid tile tile-text">{$text3}</div>
        <div class="grid tile tile-img">{$picture3}</div>
    </div>
</section>
This is the output when I am logged in:

Code: Select all

<section>
    <div class="grid tiles">
        <div class="grid tile tile-text">
            <h1>Short Text</h1>
            <hr />
            <p>Longer Text</p>
        </div>
        
        <div class="grid tile tile-img">
            <img src="https://my.domain.com/uploads/images/Gallery/mysubgallery/image5.jpg"/>
        </div>
        
        <div class="grid tile tile-text">
            <h1>Short Text</h1>
            <hr />
            <p>Longer Text</p>
        </div>
        
        <div class="grid tile tile-img">
            <img src="https://my.domain.com/uploads/images/Gallery/mysubgallery/image4.jpg"/>
        </div>
        
        <div class="grid tile tile-text">
            <h1>Short Text</h1>
            <hr />
            <p>Longer Text</p>
        </div>
        
        <div class="grid tile tile-img">
            <img src="https://my.domain.com/uploads/images/Gallery/mysubgallery/image2.jpg"/>
        </div>
    </div>
</section>
And this is the output I get when not logged in:

Code: Select all

<section>
    <div class="grid tiles">
        <div class="grid tile tile-text"></div>
        
        <div class="grid tile tile-img"></div>
        
        <div class="grid tile tile-text"></div>
        
        <div class="grid tile tile-img"></div>
        
        <div class="grid tile tile-text"></div>
        
        <div class="grid tile tile-img"></div>
    </div>
</section>
What is happening? What could be the source of the problem?

Regards,
Christian

Re: When logged in Images are visible, when logged out, they disappear

Posted: Wed Feb 21, 2024 5:35 pm
by DIGI3
The main difference between being logged in or not logged in is that caching is disabled when logged in - so that's probably a clue. Do you have Smarty Caching enabled? If so, disable it. If you have anything else that could affect caching that's the next place to look - some hosts add their own layer so be sure to investigate that too. Make sure to use a clean incognito session for each test.

Re: When logged in Images are visible, when logged out, they disappear

Posted: Wed Feb 21, 2024 6:12 pm
by caigner
Disabling Smarty Caching did the trick. Thanks!