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.

Getting No Results for a Weblog with Entries

January 17, 2010 6:10pm

Subscribe [3]
  • #1 / Jan 17, 2010 6:10pm

    mayest

    293 posts

    This is the first time this has happened to me. I’m using EE 1.68 most recent build (I think). Essentially, I’ve got a template that displays properly (all CSS, embeds, etc), except that the weblog:entries tag is returning no results, even though there is 1 entry. Here is the tag:

    {exp:weblog:entries weblog="{my_weblog}" dynamic="off"}
    
    <h1>The Journal of Financial Modeling and Educational Technology</h1>
    
    {/exp:weblog:entries}

    That is stripped down to virtually nothing. At this point, it returns no results (I get a 404 if I put {if no_results}{redirect="404"}{/if} inside the tag).

    Here is the relevant part of the template debugging:

    (0.030331) - Beginning Tag Processing -
    (0.030367) Parsing Tags in Template
    (0.030414) Tag: {exp:weblog:entries weblog="journals" dynamic="off"}
    (0.030584) Closing Tag Found
    (0.030674) Processing Tags
    (0.030725) Module Tag: Weblog/entries
    (0.030766) Including Files for Tag and Modules
    (0.075016) Beginning Final Tag Data Processing
    (0.075061) Calling Class/Method: Weblog/entries
    (0.075263) -> Class Called: Weblog
    (0.075342) -> Method Called: entries
    (0.142139) Returning No Results Content
    (0.142193) -> Data Returned
    (0.142324) - End Tag Processing -

    Note that it says: “(0.142139) Returning No Results Content” so it seems that EE isn’t seeing any entries in that weblog.

    If I type in the name of any other weblog, I get the <h1> as expected. I’ve checked the spelling of my weblog name and it is correct in the {my_weblog} defined variable. If I got to the Edit screen in the CP, the entry is there and I can edit it. I just can’t get it to show up on the page.

    I’m at my wit’s end. Any ideas?

    Thanks,

    Tim

  • #2 / Jan 18, 2010 1:50am

    John Henry Donovan

    12339 posts

    Tim,

    What else have you got going on in the template can you share that with us?

    Do you have any extensions running?

    What happens if you hard code the weblog name into the tag do you get a result?

    For that particular weblog, are there entries in the future?

  • #3 / Jan 18, 2010 2:10am

    mayest

    293 posts

    John,

    Thanks. I do have a few extensions, but everything else on the site works just as always. I use Edit Tab Ajax and jQuery for the Control panel. The only things that I have changed recently were:

    1) Created a new template group (journal)
    2) Created this new weblog (journals)
    3) Added the FieldFrame extension along with ngen file field (FF is now disabled, but it did work great on the editing the entry).

    Originally, when I created this weblog, I had an FFMatrix with ngen file fields. I deleted that from the field group after creating the template and noticing that nothing would display. I figured that deleting it and disabling FieldFrame might help with debugging, but it didn’t change anything.

    Here is the entire template. It is a bit stripped down from what I started with. This was originally copied from another template that works. If I type in the name of any weblog other than “journals” then this template works just fine. The only entry in the weblog is dated several days ago.

    {assign_variable:my_weblog="journals"}
    {assign_variable:my_template_group="journal"}
    {assign_variable:my_stylesheet="embeds/afmet_styles"}
    
    {!-- call the embedded head tag template --}
    {embed="embeds/.html_head_tag" p_title="JFMET Current Journal" style="{my_stylesheet}" pd="Table of contents for the most recent issue of the Journal of Financial Modeling and Educational Technology" kw=""}
    
    <body>
    
    <div id="mainContainer" class="clearfix">
    
    {embed="embeds/.site_header" tg="{my_template_group}"}
    
    {embed="embeds/.horiz_nav"}
    
    {embed="{my_template_group}/.left_column"}
    
    {!-- This is the main body of the page. It is the text/data in the center column. --}
    <div id="columnTwo">
    
    {embed="volume/.right_column"}
    
    {exp:weblog:entries weblog="{my_weblog}" dynamic="off"}
    
    <h1>The Journal of Financial Modeling and Educational Technology</h1>
    
    {/exp:weblog:entries}
    
    </div> {!--// end #columnTwo //--}
    
    {embed="embeds/.site_footer"}
    
    </div> {!--// end #mainContainer //--}
    
    </body>
    </html>

    If I delete the weblog and field group and start over, do you think that would help? I’m wondering if the weblog is somehow screwed up in the database. Again, everything else in the site works just like it did before. I even tried putting this template into a previous template group and got the same behavior.

    Thanks,

    Tim

  • #4 / Jan 18, 2010 3:37am

    John Henry Donovan

    12339 posts

    mayest,

    You dont have nay variables in there yet. Try using {title}

    {exp:weblog:entries weblog="{my_weblog}" dynamic="off" status="not closed"}
    
    <h1>{title}</h1>
    
    {/exp:weblog:entries}

    Next step is to create a blank template and just add the above code. Nothing else.

  • #5 / Jan 18, 2010 4:21am

    mayest

    293 posts

    John,

    Thanks for that code. The only thing that I was missing was the status=“not closed” part. I’ve never used that before, but it makes this work! I had tried using variables, but the entries tag was giving No Results. I guess that my custom status was the culprit.

    I never would have thought of that on my own. I owe you a beer. 😊

    Thanks again. You can close this thread.

  • #6 / Jan 18, 2010 5:36pm

    Ingmar

    29245 posts

    I am very glad to see you you’re all set. Please don’t hesitate to post again as needed.

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

ExpressionEngine News!

#eecms, #events, #releases