ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Sudden problem - not rendering weblog entry content for certain members

March 18, 2011 12:01pm

Subscribe [5]
  • #1 / Mar 18, 2011 12:01pm

    L2

    52 posts

    Hi,

    My client’s site has been running trouble free for 4 months and now all of a sudden a template is not rendering part of a weblog entry post for certain members (they are all in same group with same permissions).  I’ve isolated when this seems to occur but can’t pinpoint the actual problem.  I was hoping that if I outlined my findings that maybe someone with more experience may be able to spot the issue.

    Background:
    1. This is a membership site for students who when registered are assigned a unique member_id.  Each student is part of the same member group with the same permissions.
    2. I am passing the member_id into the URL string which is used on some pages to determine what to show.

    Things that seem to effect whether the weblog entry appears on front end…

    Weblog Posting Date
    1. If the CP entry’s original date was older and set as status=“closed”, then opened and dated a later date then it displays for ALL members. (I only have dates from last year, Oct. 2010.)
    2. If I create a new post today Feb. 2011 then only members with member_id’s 1-9 and 100+ can see the posting in the template (member_id’s 10-99 can NOT see the posting)

    Member IDs
    1. If I create a new post today Feb, 2011 then only members with member_id’s 1-9 and 100+ can see the posting in the template (member_id’s 10-99 can NOT see the posting)

    Dynamic=“off”
    1. If I change the weblog entries loop to use dynamic=“off” then the entry appears for ALL members.  However, I didn’t need to use this for older dated entries so I don’t think this is the issue.  Plus changing this setting effects a bunch of other pages that pull the member_id in the string so if I change them all to dynamic=“off” things break.

    My thoughts…
    1. It’s strange that an older post created in 2010 work fine (I can open and close it and everyone can see them). It’s the new posts in this weblog that are affected.
    2. Pulling the member_id in the URL string seems to matter.  Members 1-9 & 100+ work just fine for old and new posts, it’s the member_ids between 10-99 that don’t work.
    3. Could there be some default limit or conflict for member_ids or publish date that are different between 2010 & 2011?


    Thank you for taking the time to read through this.  Any advise would be greatly appreciated!

    Lori

  • #2 / Mar 19, 2011 4:41pm

    Greg Salt

    3988 posts

    Hi Lori,

    Which version and build of EE are you using? Are these member IDs the same ones that EE assigns or are they separate member custom fields? Is an extension or module involved in processing these member IDs? Can we see the site where this is happening?

    Cheers

    Greg

  • #3 / Mar 19, 2011 5:07pm

    L2

    52 posts

    Hi Greg,

    - EE version is 1.6.9
    - Yes they are EE’s default member ids
    - I am using Solspace User for member registration.

    This is a private site so I can’t give you access over the forum but I could privately.

    Thanks!
    Lori

  • #4 / Mar 21, 2011 5:21am

    John Henry Donovan

    12339 posts

    Lori ,

    Can you show us some of your template please and what you are using for conditionals?
    Also what does your URL look like that includes the memebr ID?

  • #5 / Mar 21, 2011 7:41pm

    L2

    52 posts

    THIS IS THE URL STRUCTURE:

    <a href="http://www.website.com/assignments/post/2382/7">http://www.website.com/assignments/post/2382/7</a>

    assignments = template group
    post = template
    2382 = entry number in CP
    7 = member_id

    Observations:
    - This POST.PHP page doesn’t need to look at the member_id in the URL so I could put dynamic=“off”, however I never had to do that before in order to make the page show up.
    - This problem occurs on another DETAIL.PHP page which has the same URL structure but “post” is replaced with “detail” in URL. It does pull the member_id from the URL and show content accordingly.  Again, like the post.php page, this was never a problem before.
    - Please see my first forum post for the more details

    THIS IS THE WEBLOG ENTRIES LOOP FROM POST.PHP:

    Observations:
    - When the conditions are met as I listed in my first forum post then nothing appears inside the entry loop shown below, even if I were to type “hello”.
    - I’ve included the conditional code

    {exp:weblog:entries weblog="assignments" limit="1" disable="trackbacks|pagination|categories"}
    
    <!--Assignment Complete/Exercise Form-->
    {if assignment_exercise == "None"}
    {embed="embeds/assignment_exercise_none_form" my_entry_id="{entry_id}"}
                            
    {if:elseif assignment_exercise == "Question"}
    {embed="embeds/assignment_exercise_question_form" my_entry_id="{entry_id}" my_text_instr="{assignment_exercise_text_instr}" my_correct_answer="{assignment_exer_text_answer}" my_correct_explanation="{assignment_exer_text_explan}"}
                            
    {if:elseif assignment_exercise == "Upload"}
    {embed="embeds/assignment_exercise_upload_form" my_entry_id="{entry_id}" my_upload_instr="{assignment_exercise_upload_instr}"}
    
    {/if}
                        
    {/exp:weblog:entries}

    THIS IS ONE OF THE EMBEDS (QUESTION) SO YOU CAN TAKE A LOOK - THIS IS A SAEF, DIDN’T INCLUDE THE TOP PHP STUFF

    <!--Form-->
    {exp:weblog:entry_form weblog="assignments_responses" return="assignments/detail/{segment_3}/{segment_4}"}
    
    <!--hidden-->
    <input type="hidden" name="title" id="title" value="{segment_3} - {logged_in_screen_name} - {entry_date}" />
                    
    <input type="hidden" name="field_id_60" id="field_id_60" value="
    {exp:weblog:entries weblog="assignments" limit="1" disable="trackbacks|pagination|categories"}
    {entry_id}
    {/exp:weblog:entries}" />
    <input type="hidden" name="field_ft_60" value="none"/>
                    
    <input type="hidden" name="field_id_55" value="{logged_in_member_id}"/>
    <input type="hidden" name="field_ft_55" value="none"/>
                    
    <!--Busy because want to allow a preview-->
    <input type="hidden" name="status" value="Completed"/>
                    
    <!--Need in order to allow comments in entry-->
    <input type="hidden" name="allow_comments" value='y' />
            
    <!--Upload Fields-->
    <h3>{embed:my_text_instr}<span class="req">*</span></h3>
    <h3>{assignment_resp_fellow_answer}</h3><p><!--matrix--><br />
                    <br />
    <!--Show Mentor only what answer is if Fellow hasn't Completed assignment yet--><br />
    {if logged_in_group_id == '8'}</p>
    
    <h3>The correct answer is…</h3>
    <p><blockquote class="quoteAssignment">{embed:my_correct_answer} </p>
    
    <p> {embed:my_correct_explanation}</blockquote><br />
    {/if}<br />
                    <br />
    <!--Only want to show the submit button if a Fellow or Client Admin is logged in.  Mentors will see this page too if they click through by viewing by fellow but don't want to show them the button--><br />
    {if logged_in_group_id == '7' OR logged_in_group_id == '6'}<br />
    <input type="submit" value="Submit ยป" tabindex="5" id="submit" class="button big green" name="submit"/><br />
    {/if}</p>
    
    <p>{/exp:weblog:entry_form}<br />
                <br />
    </div><!--End Exercise Form-->


    THANK YOU!!!

  • #6 / Mar 22, 2011 12:50pm

    Lisa Wess

    20502 posts

    Hi, L2 -

    This is an unusual problem and your templates are pretty complex.  The best, and really only way to troubleshoot this is to reduce your template (in a test template) down to the bare minimum. ie:

    {exp:weblog:entries weblog="assignments" limit="1" disable="trackbacks|pagination|categories"}
    
    {title}
    
    {assignment_exercise}
    
    {/exp:weblog:entries}

    and see if that is working for your URL structure.  If it is, very slowly add small pieces back until you find out where it is breaking.  Then we can focus on where the actual problem is.

    I know it is a tedious process, but we do need to isolate the issue before we can do more troubleshooting.

    Let us know how you get on!

  • #7 / Mar 31, 2011 3:48pm

    L2

    52 posts

    Hi Lisa,

    Thanks for your input.  Below are my latest findings.  Please see my above posts for more details on what I’ve already discovered.

    1. I removed all of the EE code on the page and left just the weblog entries loop where I’m experiencing the problem.  I then removed the EE code inside of there and just typed in “hi” to see if that would show.  My plain text “hi” didn’t appear.

    This is my opening weblog entries pair and closing one:

    {exp:weblog:entries weblog="assignments" limit="1" disable="trackbacks|pagination|categories"}
    {/exp:weblog:entries}

    2. Remember this page shows ok for certain member_ids (1-9, 100+)

    3. I’m not sure if it has to do with the entry number if there’s a limit - #606 works, but #2709 doesn’t).

    4. I thought perhaps that it had to do with the date (all members can see if the original entry creation date is Oct 2010 even if it was closed then opened in 2011) but I just manually changed the date info directly in the database via phpAdmin to use an entry that is working but it didn’t help.

    5. If I remove the member_id from the segment url which is in the 4th position then everyone can see the page correctly (or if I add dynamic=“off” to the weblog entries code).  Keep in mind that on this page I’m not actually pulling the member_id in my template so having it there shouldn’t matter - and why if I remove it does the page suddenly show the content for all?

    6. Through phpAdmin I looked directly at the database code and compared working weblog entries to non-working, member_ids that are working versus non-working and didn’t find any discrepancies.

    Questions:
    1. Could there be a conflict between having a number 10-99 as the last segment in the URL (or maybe a limit of some sort)?

    2. Is there a limit to the entry number (entry #606 shows correctly for all but #2709 does not)?


    Thank you so much for your continued help.

    Lori

  • #8 / Mar 31, 2011 4:24pm

    Sue Crocker

    26054 posts

    Hi, Lori.

    A couple of additional questions, if I may.

    It looks like you’re removing index.php via .htaccess. Is that so?

    What happens if you change the code in your single entry template to:

    {exp:weblog:entries weblog="assignments" limit="1" disable="trackbacks|pagination|categories" entry_id ="{segment_3}"}  
    <h3>{title}</h3>
    <p>Segment 4: {segment_4}</p>
    
    <p>{/exp:weblog:entries}

  • #9 / Mar 31, 2011 9:02pm

    L2

    52 posts

    Hi Sue,

    I tried your suggestion but I had the same result.  Members with IDs 1-9 & 100+ can see the content inside the weblog entries loop. Members 10-99 get a blank area.

    Any chance that this sudden issue could be memory related? I came across this forum post: http://ellislab.com/forums/viewthread/171933/

    Thanks!
    Lori

  • #10 / Mar 31, 2011 9:34pm

    Lisa Wess

    20502 posts

    Hi, Lori -

    If you put content outside of the entries tag, ie:

    <h2>Hello I'm FREE!</h2>

    , when you view that page, does the content in the H2 show up, and just not the content from inside the entries tag?  Or is the entire page blank?

    Also, if you go to Admin > Security and Session Preferences > Output and Debugging, try temporarily setting “PHP Errors show to all” and see if you get any errors on that page that might give us a hint. Switch it back after you test it; normally we’d stick with superadmins, but let’s open it up for a short while to test so we make sure we’re not missing any clues.

    Thanks!

  • #11 / Mar 31, 2011 9:59pm

    L2

    52 posts

    Hi Lisa,
    - If I place regular HTML code outside of the weblog entries tag it shows up so it’s something in the loop that seems to be related to the URL.
    - It’s just weird that it’s only this weblog, only new entries, and only certain members are affected.
    - I’ll set the debugging prefs tomorrow and let you know how I make out.

    Hi Sue,
    Yes, I’m removing index.php with .htaccess.

    Thanks!
    Lori

  • #12 / Mar 31, 2011 10:07pm

    Lisa Wess

    20502 posts

    If the page is loading the H2 then it’s unlikely to be a suppressed PHP error.

    Can you try paring it down even more to this code?

    {exp:weblog:entries weblog="assignments" limit="1"}  
    <h3>{title}</h3>
    <p>Segment 4: {segment_4}</p>
    
    <p>{/exp:weblog:entries}

    Also, can you share with us the URL?  I don’t need to see the site at this time, so I need the part from index.php onwards - ie: you can omit the domain name.

    Thank you!

  • #13 / Mar 31, 2011 10:21pm

    L2

    52 posts

    Hi Lisa,

    - The forum post #4 above has the URL along with some descriptions.

    - I can try your entries tag tomorrow but if it helps I tried Sue’s which was similar to yours and I had the same result. You can see in forum post #8.

    Thanks again!
    Lori

  • #14 / Mar 31, 2011 10:31pm

    Lisa Wess

    20502 posts

    Woops, sorry about that.  Can you try adding dynamic=“no” to your entries tag please?

    The code I gave is different than Sue’s as I suspect the entry_id= parameter may be part of the issue, so I removed it. Let’s try turning off the dynamic nature of looking at the URL and see if that helps =)

  • #15 / Mar 31, 2011 10:39pm

    L2

    52 posts

    Hi Lisa,

    I previously tried adding the dynamic=“off” (I’m on EE 1.6.9) and it works. However, I never needed to use this parameter before so I think there’s an underlying issue. Especially because certain member ids can see the content as well as all members for older entries without using dynamic=“off”.
    I have more detail about this in my post #1.

    I’ll try using your code tomorrow and let you know how I make out.

    Thanks!
    Lori

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases