WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] [Plugin: Page Links To] Got error msg after upgraded to 2.2 (14 posts)

  1. amphilon
    Member
    Posted 4 years ago #

    After I upgraded to 2.2, I got an error message on my web page:

    Warning: preg_replace() [function.preg-replace]: Unknown modifier '<' in
    /public_html/wp-content/plugins/page-links-to/page-links-to.php
    on line 186

    Switched back to 2.1, then no errors at all...

    http://wordpress.org/extend/plugins/page-links-to/

  2. mfontanilla
    Member
    Posted 4 years ago #

    I had the same problem and resolved it the same way by downgrading back to 2.1

  3. ucero
    Member
    Posted 4 years ago #

    It works well on two sites hosted on different servers. A few mins I updated the plugin to the latest version 2.2.

  4. kjetilgf
    Member
    Posted 4 years ago #

    Same problem here as described by apmphilon - error message appears on top of front end pages.
    v 2.1 apparently works fine with WP 2.9.1

    ALSO
    a page I edited showed up blank - till I discovered that a http:// had showed up in the page-links-to field. Hard to send people there...

    Thanks,
    Kjetil

  5. ...paul
    Member
    Posted 4 years ago #

    Same problem here; had to go back to 2.1

  6. alexp999
    Member
    Posted 4 years ago #

    I've been using 2.1 for a bit now, then I updated to 2.2 and decided to see if this feature to highlight the menu/tab if you are on a wordpress page.

    It doesn't work in 2.1 and it seems the author has tried to fix it in 2.2 and its still a no go. Hopefully they can find whats causing it and get it working.

    That highlight feature will be the icing on the cake for this plugin, and just what I need as I am using it to create a menu with a mix of pages, categories and links.

  7. biglamb
    Member
    Posted 4 years ago #

    same issue as described above and went back to 2.1

  8. onlinemethod
    Member
    Posted 4 years ago #

    Same, it killed my entire page menu and replaced it with error code.

    So I had to roll back to 2.1.

  9. mihai.todor85
    Member
    Posted 4 years ago #

    You can replace line 186 with this:

    $pages = str_replace(' href="'.$current_page.'"', ' class="active" href="'.$current_page.'"', $pages );

    It will fix the error and make the highlighting work. I'm not sure if line 185 is doing what it should, though.

    PS: This is just a quick and dirty fix. I'm not a big fan of doing string replacing in HTML code. I'm sure there must be a better way of doing this...

    PS2: I'm not responsible if it crashes something else.

  10. meli30068
    Member
    Posted 4 years ago #

    you can fix it temporarily by taking lines 185 and 186 and revert them to version 2.1. Didn' t have time to look for the real error.

    $pages = str_replace( ' class="page_item current_page_item"', ' class="page_item"', $pages );
    $pages = str_replace( '<li class="page_item"><a href="' . $current_page . '"', $pages );
    #2.2 $pages = preg_replace( '| class="([^"]+)current_page_item"|', ' class="$1"', $pages ); // Kill default highlighting
    #2.2 $pages = preg_replace( '<li class="([^"]+)">
    <a href="' . $current_page . '"', $pages );

  11. alexp999
    Member
    Posted 4 years ago #

    2.1 doesn't give me the highlight either which is a shame. Not sure why, tho.

    I'm using Atahualpa if it makes any difference.

  12. Mark Jaquith
    WordPress Lead Dev
    Posted 4 years ago #

    Really sorry about this, everyone. Version 2.3 fixes the bug and restores menu highlighting! I just pushed it out, and it should be available for download in 15-30 minutes.

  13. ...paul
    Member
    Posted 4 years ago #

    Thanks Mark.

  14. Steven Almeroth
    Member
    Posted 4 years ago #

    Still having a problem with URI in 2.3. My anchors link to the index like so <a href="?p=185"> but the new 2.3 version made that linking to http://?p=185 so I had to roll back to 2.1.

Topic Closed

This topic has been closed to new replies.

About this Topic