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

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
howey
Forum Members
Forum Members
Posts: 158
Joined: Fri Sep 14, 2007 1:05 pm

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

Post 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.
Last edited by howey on Thu Dec 09, 2010 1:21 pm, edited 1 time in total.
andershz
Forum Members
Forum Members
Posts: 49
Joined: Fri Nov 21, 2008 9:30 pm

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

Post by andershz »

Have you disabled caching for this page?
howey
Forum Members
Forum Members
Posts: 158
Joined: Fri Sep 14, 2007 1:05 pm

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

Post 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
jmcgin51
Power Poster
Power Poster
Posts: 1899
Joined: Mon Jun 12, 2006 9:02 pm

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

Post 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>
Post Reply

Return to “Modules/Add-Ons”