Home / Forums / DynamiX Support / 404 for Pagenavi-css link

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts

  • Matt Wrycraft
    Participant

    Hi.

    I’ve noticed, after upgrading, that my site is returning a 404 for pagenavi-css. Here is the code on the page:
    <link rel='stylesheet' id='wp-pagenavi-css' href='http://www.emptyspiral.net/wp-content/plugins/home/emptyspi/public_html/wp-content/themes/DynamiX/lib/inc/pagenavi-css.css?ver=2.60' type='text/css' media='all' />

    I can see why – the URL is made up off the path of my webserver, rather than the webroot. I’m at a loss as to why this is happening and I can’t find reference to pagenavi-css in the theme code. If I can work out where that is I can review whether it’s beening caused by an issue with my webserver.

    Any thoughts?


    Tom ( Support)
    Keymaster

    Hi Matt,

    Do you have the Pagenavi plugin installed? If so, please de-activate it as it is now built directly into DynamiX and will cause issues if the plugin is installed too.

    Please let me know how you get on.

    Kind regards,
    Tom


    Matt Wrycraft
    Participant

    Hi Tom,

    No I don’t have the Pagenavi plugin installed explicitly – I wasn’t even aware of the plugin until I saw this error. I assume it is installed as part of DynamiX?

    It looks to me like something in the code is referencing the wrong path (the absolute server path rather than from the webfoot).
    What makes it even more confusing is that pagenavi-css.css isn’t in any of the folders. It looks like a coding issue, but I don’t know if it’s from the theme or something else.

    I’ve looked in the DynamiX code and it could be this contained in wp-pagenavi.php:
    if (@file_exists(STYLESHEETPATH.'/pagenavi-css.css')) {
    $css_file = get_stylesheet_directory_uri() . '/pagenavi-css.css';
    } elseif (@file_exists(TEMPLATEPATH.'/pagenavi-css.css')) {
    $css_file = get_template_directory_uri() . '/pagenavi-css.css';
    } else {
    $css_file = plugins_url('pagenavi-css.css', __FILE__);
    }

    wp_enqueue_style('wp-pagenavi', $css_file, false, '2.60', 'all');
    }

    I’m not sure, but it looks like ‘plugins_url’ is returning /wp-content/plugins/home/emptyspi/public_html/wp-content/themes/DynamiX/lib/inc/ ?

    I’ve also searched for pagenavi.css in the DynamiX folders and can’t find it, so it looks like the code is making reference to something that doesn’t exist (even IF the path was correct).

    Thoughts?


    Tom ( Support)
    Keymaster

    Hi Matt,

    Thats very strange, anyways, heres a fix.

    replace the following line (at the bottom of the code you posted)
    wp_enqueue_style(‘wp-pagenavi’, $css_file, false, ‘2.60’, ‘all’);

    with (just commenting it out should stop the error)
    //wp_enqueue_style(‘wp-pagenavi’, $css_file, false, ‘2.60’, ‘all’);

    Very weird, come on on no one else has come across this error.

    Hope this helps.

    Kind regards,
    Tom


    Matt Wrycraft
    Participant

    Thanks Tom!


    Matt Wrycraft
    Participant

    I’ve amended DynamiX/lib/inc/wp-pagenavi.php and it’s worked. I can’t see any difference to the page so I assume it was not needed.

    Thanks 🙂


    Tom ( Support)
    Keymaster

    Hi Matt,

    Thats great, nice one. The stylesheet was never being used, strange it only came to surface on your site.

    Kind regards,
    Tom


    Matt Wrycraft
    Participant

    Thanks again Tom.

    Perhaps no one else looks for 404s on their pages? 😀

Viewing 8 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic.