CustomContent - don't see logged on content without a second click

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Locked
skypanther

CustomContent - don't see logged on content without a second click

Post by skypanther »

I'm having troubles with CustomContent. I've tried both the smarty and HTML comment syntax and neither is working for me. Here's a summary of the code I'm using:

Code: Select all

{if $customcontent_memberof_students}
  ... show secure content 
{else}
   {cms_module module=FrontEndUsers form=login}
{/if}
Here's the issue. User clicks on a link to the Students page (in menu) and is presented with the logon form. They log on. They get the log on form again, no secure content. But, if they click the Students menu link again, they get the page and its secure content.

Page caching is off. I've tried setting the admin prefs to redirect to the group name (the group name specifically matches the page alias). I've tried with various browsers.

CMS-MS version 1.0.2
FEU version 1.1.2
CustomContent version 1.4.4

What's up?

Tim

Edit: I've also tried using {if $customcontent_memberof_students=='1'} and {if $customcontent_memberof_students==1} but it works the same.
Last edited by skypanther on Mon Mar 05, 2007 4:18 pm, edited 1 time in total.
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm
Location: Fernie British Columbia, Canada

Re: CustomContent - don't see logged on content without a second click

Post by calguy1000 »

Try upgrading to CMS 1.0.4
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
skypanther

Re: CustomContent - don't see logged on content without a second click

Post by skypanther »

Okay, so I upgraded to CMS-MS 1.0.4 and I'm still seeing the same behavior. You log on to FEU and have to click the link to the secure page a second time to see the custom content.

Other ideas?

Tim
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm
Location: Fernie British Columbia, Canada

Re: CustomContent - don't see logged on content without a second click

Post by calguy1000 »

okay, I just went through this last night with another person.

a) make sure you're using the latest version of CustomContent
b) make sure that your pages with customcontent logic, etc, or even the feu tag are marked as non cachable.
c) your customcontent expression should be something like:
    {if isset($customcontent_loggedin) && $customcontent_loggedin > 0 }
       
    {else}
         
    {/fi}
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
skypanther

Re: CustomContent - don't see logged on content without a second click

Post by skypanther »

Calguy,

I'm using CustomContent 1.4.4.

The Cachable checkbox is definitely not checked on this page.

I tried using this logic:

{if isset($customcontent_loggedin) && $customcontent_loggedin > 0  && $customcontent_memberof_students > 0}

Still, same behavior. After logging on, I get the login form again until I click the menu link a second time.

I'm using FEU 1.1.2. I'm leary of using a beta version on a production site. But, if that's what it will take, I'll try it. How stable is your new beta code?

Tim
skypanther

Re: CustomContent - don't see logged on content without a second click

Post by skypanther »

bump...
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm
Location: Fernie British Columbia, Canada

Re: CustomContent - don't see logged on content without a second click

Post by calguy1000 »

skypanther wrote: bump...
Beta1 seems okay, Beta2 is pooched, but a beta3 is upcoming...... it shouldn't have anything to do with FEU though, it's either a customcontent issue, or a cache problem.

btw:  {get_template_vars} is your friend when you are debugging these issues, it shows you what variables are defined in smarty, and what their values are so that you can see if your expressions are correct.

I'd recommend you put that in directly above your customcontent logic for debugging purposes.  Once it works you can take it out.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
skypanther

Re: CustomContent - don't see logged on content without a second click

Post by skypanther »

Okay, {get_template_vars} shows that no custom content related variables exist on the first load of the page (after logging on) but they're all there after I click the link the second time. So, thinking myself clever, I added this to the template to work around it:

Code: Select all

{cms_module module=CustomContent}
{if !isset($customcontent)}
{literal}
<?php
header('location:'.$_SERVER['PHP_SELF']);
die();
?>
{/literal}
{/if}
But, that didn't work. The code is output as plain text. I tried without the delimiters and I also tried all this on the page itself (though I'd much rather have it in the template so all secure pages inherit the fix).

Is there a smarty way of reloading the page if some template variable doesn't exist?

Tim
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm
Location: Fernie British Columbia, Canada

Re: CustomContent - don't see logged on content without a second click

Post by calguy1000 »

if you'd put that code into a GCB (without the ) called the gcb in your page, it would have worked
otherwise
you have to set the $config['use_smarty_php_tags'] variable in config.php to true
and then use

{php} and {/php}
i.e:
{php} phpinfo(); {/php}

if you can catch up to me in the IRC channel, I may be able to help you out there.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
skypanther

Re: CustomContent - don't see logged on content without a second click

Post by skypanther »

I tried but it ain't working for me. How do I do IRC? I have AIM and YIM accounts but have never used IRC. Do you have an ID or something I need to know?

Tim
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm
Location: Fernie British Columbia, Canada

Re: CustomContent - don't see logged on content without a second click

Post by calguy1000 »

the chat button in the forum main page is a start.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
skypanther

Re: CustomContent - don't see logged on content without a second click

Post by skypanther »

I finally came up with a workaround. I added this to my template, within the section

{if !isset($customcontent)}
    window.location='index.php?page=students';
   
{/if}

Crude but effective.

Tim
Locked

Return to “Modules/Add-Ons”