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.

{page_uri} bug EE 1.6.9 [resolved: false alarm]

July 12, 2010 8:54am

Subscribe [3]
  • #1 / Jul 12, 2010 8:54am

    stephenfrank

    12 posts

    Feel free to shoot me down if this isn’t a valid bug because it could be caused by either EE or caused by the Structure Module.

    It looks like {page_uri} isn’t being parsed in the weblog:entries loop. This is the first time I’ve experienced this.

    My exp_sites|site_pages serialized array looks something like:

    Array
    (
    [1] => Array
    (
    [uris] => Array
    (
    [18] => /contact_us/
    )
    
    [templates] => Array
    (
    [18] => 22
    
    )
    
    [url] => <a href="http://example.com/">http://example.com/</a>
    )
    
    )

    I notice that (what I assume is a new 1.6.9 update) the exp_sites|site_pages array is held within an array using the site_id as an array key.

    The Weblogs Module at line 3263 handles {page_uri}

    if ($site_pages !== FALSE && isset($site_pages['uris'][$row['entry_id']]))
       {
         $row['page_uri'] = $site_pages['uris'][$row['entry_id']];
          $row['page_url'] = $FNS->create_url($site_pages['uris'][$row['entry_id']]);
       }

    and edited as such

    if ($site_pages !== FALSE && isset($site_pages[$row['site_id']]['uris'][$row['entry_id']]))
                {
                    $row['page_uri'] = $site_pages[$row['site_id']]['uris'][$row['entry_id']];
                    $row['page_url'] = $FNS->create_url($site_pages[$row['site_id']]['uris'][$row['entry_id']]);
                }

    Adding the $row[‘site_id’] solved the issue on this particular site.

    So my question is, is the exp_sites|site_pages array supposed to be formatted this way as of 1.6.9 and is this bug valid?

  • #2 / Jul 13, 2010 3:44am

    John Henry Donovan

    12339 posts

    stephenfrank,

    In EE 1.6.9’s version notes it specifically mentions Structure and the need to upgrade that along with EE. Can you upgrade to latest Structure and see if bug remains.

  • #3 / Jul 13, 2010 4:33am

    stephenfrank

    12 posts

    Thanks,

    I’ve since found that it was a botched upgrade to 1.6.9 that caused the problem. The Weblog module files were not properly overwritten (specifically the lines around line 3263 being the problem).

    -Stephen

  • #4 / Jul 13, 2010 6:18pm

    Brandon Jones

    5500 posts

    Glad you found the culprit!

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

ExpressionEngine News!

#eecms, #events, #releases