Page 1 of 1

[solved] FEU Custom Content - custom content disappears when navigating

Posted: Thu Dec 09, 2010 12:04 pm
by howey
Hi

I am trying to add a resource on my website so that the "Trustees" can access documents. I am using FEU with the Custom Content module.

On the first page I have the login code and a menu item that lists the pages the documents are on

Code: Select all

<div id="mainBodypr">
{cms_module module=FrontEndUsers}
{if $customcontent_loggedin > 0}
<div class="fileList">
<p>{content}</p>
<h3><br />Available Documents</h3>
<hr />
<p>{menu start_level="3"}</p>
{else}
  <h3>You are not authorized to view this data</h3>
{/if}
</div>
Once you navigate to the next level I am using the file_list tag to generate a list of files

Code: Select all

<div id="mainBodypr">
{content block="Directory" assign="directory" wysiwyg="false" oneline="true"}
{cms_module module=FrontEndUsers}
{if $customcontent_loggedin > 0}
<div class="fileList">
<h3>{content}</h3>
<h4><br />Available Documents</h4>
<hr />
{file_list sort='dd' folder="uploads/trustees/$directory/"}
{else}
  <h3>You are not authorized to view this data</h3>
{/if}
</div>
All works well when you first login, menu displays then you can navigate to the relevant page where the files display OK. The variable $directory is assigned from a content block on the page to facilitate adding directories and pages.

The problem occurs when you navigate away from the page. If you navigate away then try to go back to the page with the file list on the content has disappeared and the message "You are not authorized to view this data" appears. Although you appear to still be logged in via FEU as there is the ption to log out and when you return to the first page the menu list is still there.

Is tis a session problem, or is there a problem with the code?

I am using a Webfusion VPS where open base dir is active.

Session Save Path (session_save_path): No check because open basedir active

Any suggestions, advice/help would be much appreciated.

Re: FEU Custom Content - custom content disappears when navigating away from page

Posted: Thu Dec 09, 2010 1:07 pm
by andershz
Have you disabled caching for this page?

Re: FEU Custom Content - custom content disappears when navigating away from page

Posted: Thu Dec 09, 2010 1:20 pm
by howey
Hi

I hadn't disabled caching - such a simple thing, but it seems to have worked.

Huge thanks, I've a feeling I could have wasted a lot of time.

Cheers

Re: [solved] FEU Custom Content - custom content disappears when navigating

Posted: Thu Dec 09, 2010 2:13 pm
by jmcgin51
howey wrote: Hi

I am trying to add a resource on my website so that the "Trustees" can access documents. I am using FEU with the Custom Content module.

On the first page I have the login code and a menu item that lists the pages the documents are on

Code: Select all

<div id="mainBodypr">
{cms_module module=FrontEndUsers}
{if $customcontent_loggedin > 0}
<div class="fileList">
<p>{content}</p>
<h3><br />Available Documents</h3>
<hr />
<p>{menu start_level="3"}</p>
{else}
  <h3>You are not authorized to view this data</h3>
{/if}
</div>
Once you navigate to the next level I am using the file_list tag to generate a list of files

Code: Select all

<div id="mainBodypr">
{content block="Directory" assign="directory" wysiwyg="false" oneline="true"}
{cms_module module=FrontEndUsers}
{if $customcontent_loggedin > 0}
<div class="fileList">
<h3>{content}</h3>
<h4><br />Available Documents</h4>
<hr />
{file_list sort='dd' folder="uploads/trustees/$directory/"}
{else}
  <h3>You are not authorized to view this data</h3>
{/if}
</div>
All works well when you first login, menu displays then you can navigate to the relevant page where the files display OK. The variable $directory is assigned from a content block on the page to facilitate adding directories and pages.

The problem occurs when you navigate away from the page. If you navigate away then try to go back to the page with the file list on the content has disappeared and the message "You are not authorized to view this data" appears. Although you appear to still be logged in via FEU as there is the ption to log out and when you return to the first page the menu list is still there.

Is tis a session problem, or is there a problem with the code?

I am using a Webfusion VPS where open base dir is active.

Session Save Path (session_save_path): No check because open basedir active

Any suggestions, advice/help would be much appreciated.
Also, the CustomContent syntax you're using is deprecated.  Your code should look like this:

Code: Select all

<div id="mainBodypr">
{cms_module module=FrontEndUsers}
{if $ccuser->loggedin()}
<div class="fileList">
<p>{content}</p>
<h3><br />Available Documents</h3>
<hr />
<p>{menu start_level="3"}</p>
{else}
  <h3>You are not authorized to view this data</h3>
{/if}
</div>
Once you navigate to the next level I am using the file_list tag to generate a list of files

Code: Select all

<div id="mainBodypr">
{content block="Directory" assign="directory" wysiwyg="false" oneline="true"}
{cms_module module=FrontEndUsers}
{if $ccuser->loggedin()}
<div class="fileList">
<h3>{content}</h3>
<h4><br />Available Documents</h4>
<hr />
{file_list sort='dd' folder="uploads/trustees/$directory/"}
{else}
  <h3>You are not authorized to view this data</h3>
{/if}
</div>