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.

Gallery and Forum tags seem to clash - white screen

August 30, 2007 3:08pm

Subscribe [1]
  • #1 / Aug 30, 2007 3:08pm

    Phoebe

    58 posts

    I want to put the latest entries from the gallery, blog and forum on the index page but gallery and forums won’t play together. I can have gallery and blog or blog and forums but if I have gallery and forums tags I just get a blank screen, no HTML at all.

    Just set these up in 1.6 and 2.0 of forums - there are a few entries in each.

    Anything I should have done?

    {exp:gallery:entries gallery="mgmt_pics" orderby="entry_date" columns="4" rows="1"}
    
    <table >
    
    {entries}
    
    {row_start}<tr>{/row_start}
    
    {row}
    <td>
    <a href="http://{id_path=gallery/comments}">{thumb_url}</a>
    
    {title}
    </td>
    {/row}
    
    {row_blank}<td> </td>{/row_blank}
    
    {row_end}</tr>{/row_end}
    
    {/entries}
    
    </table>
    
    {/exp:gallery:entries}
    </div>
    
    
    
    
    
    <div id="forums">
    
    <h2><a href="http://{site_url}index.php/forums">Forums</a></h2>
    
    <h3>Lastest Posts</h3>
    
    <p><table></p>
    
    <p><tr><br />
    <td>Title</td><br />
    <td>Last Post Info</td><br />
    </tr></p>
    
    <p>{exp:forum:topic_titles orderby="post_date" sort="desc" limit="10"}<br />
    <tr><br />
    <td><a href="http://{thread_path=forums/viewthread}">{title}</a></td><br />
    <td>On: {last_post_date format="%m/%d/%Y %h:%i %a"}</p>
    
    <p>By: <a href="http://{last_author_profile_path=forums/member}">{last_author}</a></td><br />
    </tr><br />
    {/exp:forum:topic_titles}</p>
    
    <p></table></p>
    
    <p></div> <!--forums -->

  • #2 / Aug 30, 2007 3:09pm

    Lisa Wess

    20502 posts

    I just tested your exact code on my site (well different gallery shortname) and no clash.  I suspect you’re getting a memory error, but it’s suppressed.  Do you have errors output turned on in the Admin area?

    Also, what else is going on in that template, or is that the only thing in it for testing?

  • #3 / Aug 30, 2007 3:44pm

    Phoebe

    58 posts

    Have debugging on but nothing coming out.  Think is must be memory as if I take the embed…banner line out it works okay too.  Anything to be done?

    Page is here:http://mgmt.cef.ie

    Full template:

    {assign_variable:weblog_name="weblog"}
    {assign_variable:template_name="site"}
    
    
    {embed="{template_name}/page_head"}
    {embed="{template_name}/banner"}
    
    <div id="pics">
    
    {exp:gallery:entries gallery="mgmt_pics" orderby="entry_date" columns="4" rows="1"}
    
    <table >
    
    {entries}
    
    {row_start}<tr>{/row_start}
    
    {row}
    <td>
    <a href="http://{id_path=gallery/comments}">{thumb_url}</a>
    
    {title}
    </td>
    {/row}
    
    {row_blank}<td> </td>{/row_blank}
    
    {row_end}</tr>{/row_end}
    
    {/entries}
    
    </table>
    
    {/exp:gallery:entries}
    </div>
    
    
    <div id="forums">
    
    <h2><a href="http://{site_url}index.php/forums">Forums</a></h2>
    
    <h3>Lastest Posts</h3>
    
    <p><table></p>
    
    <p><tr><br />
    <td>Title</td><br />
    <td>Last Post Info</td><br />
    </tr></p>
    
    <p>{exp:forum:topic_titles orderby="post_date" sort="desc" limit="10"}<br />
    <tr><br />
    <td><a href="http://{thread_path=forums/viewthread}">{title}</a></td><br />
    <td>On: {last_post_date format="%m/%d/%Y %h:%i %a"}</p>
    
    <p>By: <a href="http://{last_author_profile_path=forums/member}">{last_author}</a></td><br />
    </tr><br />
    {/exp:forum:topic_titles}</p>
    
    <p></table></p>
    
    <p></div> <!--forums --> </p>
    
    <p>{embed="{template_name}/footer"}</p>
    
    <p><br />
    {embed="{template_name}/page_tail"}

  • #4 / Aug 30, 2007 3:46pm

    Lisa Wess

    20502 posts

    What’re the contents of those embeds?

    And do you have the PHP errors on? Not the debugging but the actual errors?  It’d be nice to see an error but I am guessing it is memory. You might check your server error logs, as well.

    Also, this kb article might help us get some information to work with. =)

  • #5 / Aug 30, 2007 3:58pm

    Phoebe

    58 posts

    Spot on.  Here is the error in the log: [30-Aug-2007 19:54:33] PHP Fatal error:  Allowed memory size of 8388608 bytes exhausted (tried to allocate 737280 bytes) in /hsphere/local/home/cef2007/mgmt.cef.ie/system/modules/weblog/mod.weblog.php on line 3975

    Seems a bit strange, allowed 8M and failed trying to allocate .7!  Will contact host. 

    Thanks.

  • #6 / Aug 30, 2007 3:59pm

    Lisa Wess

    20502 posts

    The failed to allocate is .7 over the 8meg.  8meg is PHP’s default, but for dynamic applications, 16 or 32 is really much better.  That said, a template that uses that much memory may have something going on.  I’d need to see the embeds to have any idea, though.  I’d recommend turning on the template debugger to see where the hold up is and what is using so much memory.

  • #7 / Aug 30, 2007 4:04pm

    Phoebe

    58 posts

    I see!

    Embeds are just headers, footers etc.  Can be seen working on this page: http://mgmt.cef.ie/index.php/site/more/m_comm_minutes_200207/

    Template debugging doesn’t display anything as php is falling over before it starts outputting.

    Can give you access to CP if you like or I can see if I can get hosting co. to increase PHP memory.

  • #8 / Aug 30, 2007 4:08pm

    Lisa Wess

    20502 posts

    I mean, once you have the memory error sorted and get the template to fully render, you might look at template debugging.  I mean, as an example, I do some very odd stuff on my home-page, and at 55 queries it’s only taking 5 meg of memory.  Going over 8 is something I’d be looking at and trying to figure out why and where.

  • #9 / Aug 30, 2007 5:25pm

    Phoebe

    58 posts

    Wilco. Thanks for those pointers, saved me loads of time.

  • #10 / Sep 05, 2007 1:38pm

    Phoebe

    58 posts

    Got more memory and did some template debugging.  Here is the memory usage in Mb

    Just Gallery:5.7
    Just Weblog: 5.0
    Just Forum: 4.97

    Weblog & Gallery: 5.8
    Weblog & Forum: 7.9

    All 3: 8.6
    None: 4.9

    Removed all the embedded templates: 2.5Mb

    So by my reconning, embedded templates are using 2.5
    Gallery: 0.7
    Weblog: 0.1
    Forum: 2.9

    Any the wiser?

  • #11 / Sep 05, 2007 2:05pm

    Lisa Wess

    20502 posts

    Nope, that seems entirely reasonable.  I think you just needed a bit more than the default of 8meg. You should be fine. =) I think I misread it last time as a much larger number, you’re only barely over 8 so I wouldn’t worry about it too much.

  • #12 / Sep 05, 2007 2:51pm

    Phoebe

    58 posts

    That’s great.  Many thanks.

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

ExpressionEngine News!

#eecms, #events, #releases