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.

reverse_related_entries Issue

January 13, 2012 2:15pm

Subscribe [3]
  • #1 / Jan 13, 2012 2:15pm

    LucasHibbard

    61 posts

    Hi All,

    I’m so stuck right now.  I am trying to use the reverse_related_entries tag with a parent that has dynamic set to no.  Every time I do this, a receive a 500 error on the page.  If I take out the reverse_related_entries conditions, it works, or if I take out the dynamic, no error but now returns.  Completely stumped.

    Here is my code:

    {exp:channel:entries channel="exhibitors" status="open|Approved" dynamic="no" orderby="exhibitor_name" sort="asc"}
                {reverse_related_entries channel="products" status="open|Approved"}
                {if no_reverse_related_entries}
                        <li id="coming-soon">Coming Soon</li>
                            {/if}
         <li>
          <a href="http://{url_title_path=%27products/product%27}" class="pl-item">_                            <center>_                            {exp:ce_img:single src="{product_image}" alt="{title}" crop="no|center,center" max_width="190" max_height="150" cache="yes" refresh="360"}_                            </center>_                            <span class="about-title">About This Piece</span>_                        </a>
          <div class="about-piece">
           <span class="about-title">About This Piece</span> 
           <div class="about-copy">
            <h5>{exhibitor_name}</h5>
    <p>        <small>{title}</small><br />
            <a href="http://{url_title_path=products/product}">Product Details »</a><br />
           </div><br />
          </div><br />
         </li><br />
                {/reverse_related_entries}<br />
            {/exp:channel:entries}

    I am on version 2.3.1 of EE.

    Thanks for your help.

    ~ Lucas

  • #2 / Jan 15, 2012 7:10am

    Sean C. Smith

    3818 posts

    Hi LucasHibbard,

    This does seem odd. So your code works, everything renders correctly, as long as the dynamic=“no” parameter is removed or you do not use reverse related entries - is this correct?

    Does the code for the reverse related section display correctly in a separate template?
    Could you post the contents of your .htaccess file here?

    Sean

  • #3 / Jan 16, 2012 8:46am

    LucasHibbard

    61 posts

    Hey Sean,

    Thanks for your help.  Your summary is correct.  It is working with either of those things, but not both.

    As for your question, yes this exact same reverse related section is displaying correctly in other templates.  I actually took the code from another template that I am using it in, that’s what is making this so confusing.

    Here is my htaccess file:

    Options +FollowSymlinks
    
    DirectoryIndex index.php
    
    <FilesMatch "\.(css|js|img|jpg)$">
     allow from all
    </FilesMatch>
    
    <Files index.html>
    allow from all
    </Files>
    
    RewriteEngine On
    RewriteBase /
    RewriteCond %{SERVER_PORT} 80
    RewriteRule ^(.*)$ - [E=site_url:https://www.koodemonde.com/]
    
    RewriteCond %{SERVER_PORT} 443
    RewriteRule ^(.*)$ - [E=site_url:https://www.koodemonde.com/]
    
    # Remove index.php
    # Uses the "include method"
    # <a href="http://expressionengine.com/wiki/Remove_index.php_From_URLs/#Include_List_Method">http://expressionengine.com/wiki/Remove_index.php_From_URLs/#Include_List_Method</a>
     RewriteCond %{QUERY_STRING} !^(ACT=.*)$ [NC]
     RewriteCond %{REQUEST_FILENAME} !-f
     RewriteCond %{REQUEST_FILENAME} !-d
     RewriteRule ^(.*)$ /index.php/\?/$1 [L]
     
     # GZIP compression (this is tested on MediaTemple. Other servers may require a different compression declaration
    <filesmatch "\.(gif|jpg|png|ico|css|js|woff|ttf|svg|eot)$">
        SetOutputFilter DEFLATE
    </filesmatch>

    Thanks for your help, Sean.  If there is anything else that you need from me please let me know.

    Thanks,
    Lucas

  • #4 / Jan 16, 2012 6:19pm

    Sean C. Smith

    3818 posts

    Hi Lucas,

    I see that you are using a method to remove index.php that is different from the officially supported method. Could you replace that section of your htaccess file with the one from the docs .

    <IfModule mod_rewrite.c>
            RewriteEngine On
    
            # Removes index.php
            RewriteCond $1 !\.(gif|jpe?g|png)$ [NC]
            RewriteCond %{REQUEST_FILENAME} !-f
            RewriteCond %{REQUEST_FILENAME} !-d
            RewriteRule ^(.*)$ /index.php/$1 [L]
    
            # If 404s, "No Input File" or every URL returns the same thing
            # make it /index.php?/$1 above (add the question mark)
    </IfModule>
  • #5 / Jan 17, 2012 8:29am

    LucasHibbard

    61 posts

    Hi Sean,

    Thanks for that.  I have put this in but I am still seeing the same issue with the reverse_related_entries tag.  Do you have any insight into that issue?  Anything would be very much appreciated.

    Thanks,
    Lucas

  • #6 / Jan 23, 2012 1:37pm

    LucasHibbard

    61 posts

    Hi Everyone,

    I really need this resolved.  I’m not sure why this is happening and they client is fuming.  Any help would be very very very very appreciated.

    Thank you,
    Lucas

  • #7 / Jan 23, 2012 8:09pm

    Dan Decker

    7338 posts

    Hey Lucas,

    Let me apologize for the delay in response. To get you resolved as quickly as possible, I’d like to get a hands on look at what is happening here. Be on the lookout for an email from me.

    Cheers!

  • #8 / Jul 02, 2012 7:15pm

    Hi Both,
    Did you ever solve this, I´m stuck in the same issue :(

  • #9 / Jul 03, 2012 8:15am

    LucasHibbard

    61 posts

    Hi Ovasio,

    I know that we did resolve this issue, but unfortunately I don’t recall what we did to fix it.  I think though if you try remove the reverse_related_entries and put that code into an embed it might work for you.  Sorry I could give you a definitive answer, it’s been awhile since I had this issue.

    If there is anything else, let me know and I’ll do the best I can to help you out.

    Thanks,
    Lucas

  • #10 / Jul 03, 2012 12:45pm

    Well it turned out it was a memory issue and we solved it for now by raising limit for php-execusion from the default 32 to 128mb by adding something like this to the .htaccess: php_value memory_limit 128M

    Now we´ll keep an eye on how things are increasing over time as it might be a problem again later.

  • #11 / Jul 03, 2012 12:46pm

    LucasHibbard

    61 posts

    Ow good.  I’m glad to hear that you were able to resolve this issue.

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

ExpressionEngine News!

#eecms, #events, #releases