WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] '{1}' prefixed to the date of all posts after 2.0.3 upgrade (20 posts)

  1. reflexiv
    Member
    Posted 8 years ago #

    I just upgraded to 2.0.3 from 2.0.2 and now my blog at http://nakba48.org has the character '{1}' prefixed to the date of all my posts, e.g. {1}June 1st, 2006. I am using a custom theme but utilizing the same time function as the default template: <?php the_time('F jS, Y') ?>.

    Also, I just upgraded from a completely new and unmodified (no plugins or anything) 2.0.2 install on another blog at http://studentsforahumansociety.org/index.php and it appears to be doing the same thing. Has anyone else seen this before or possibly point me in the right direction? Thanks!

  2. Nazgul
    Member
    Posted 8 years ago #

    I'm experiencing the same problem.

    I think it's related to ticket #2564, which was included in the 2.0.3 release, but I don't know why this is happening.

    Edit: my date format is: "j F Y"

  3. Nazgul
    Member
    Posted 8 years ago #

    I've changed the fixes from that ticket back to the way they were in 2.0.2 and that solved the issue for me.

    I think it's a 'useless' fix anyway, because I don't know of any regional setting where the name of a day or a month (see below) start with a literal number, thus making the fix void anyhow, except maybe for esthetics.

    The replace takes place on:
    D (A textual representation of a day, three letters)
    F (A full textual representation of a month, such as January or March)
    l (A full textual representation of the day of the week)
    M (A short textual representation of a month, three letters)

  4. reflexiv
    Member
    Posted 8 years ago #

    Thanks for bring that ticket to my attention Nazgul, I didn't think to search there. I reverted back the 'fix' and it seems to be working now for me as well.

  5. Qwerios
    Member
    Posted 8 years ago #

    Same problem here. Reverted the "fix" just like Nazgul and all is well now.

    Good find Naz.

  6. What version of PHP are you all running?

    As far as I can tell from (http://uk.php.net/preg_replace) the \{1} format for referring to backreferences in the regular expressions should work fine on PHP 4.0.4.

  7. Nazgul
    Member
    Posted 8 years ago #

    I'm running on PHP 4.1.2 and my PCRE library version, specified in phpinfo, is 3.4 22-Aug-2000.

  8. gdewis
    Member
    Posted 8 years ago #

    I found the following when I did a diff on wp-includes/functions.php. The 2.0.3 version is on top, the previous version is on bottom:

    Starting around line 35 or so in functions.php and continuing for about 5 lines are \${1} in the function call. In the previous version, it was \\1.

    Changing the \${1} to \\1, as it was in the previous version fixed things. I'm running PHP 4.1.2.

  9. peter-b
    Member
    Posted 8 years ago #

    Did the above mod - worked for me too! Thanks!

    Using php 4.2.2
    mysql 4.1.18
    Apache 2.0.40

  10. Michael Adams (mdawaffe)
    Member
    Posted 8 years ago #

    Nazgul, this related ticket confirms that some regional settings do need this change.

  11. johnath
    Member
    Posted 8 years ago #

    Adding to the chorus, this fixed my problems as well using PHP 4.2.2

  12. Samuel Wood (Otto)
    Tech Ninja
    Posted 8 years ago #

    As far as I can tell from (http://uk.php.net/preg_replace) the \{1} format for referring to backreferences in the regular expressions should work fine on PHP 4.0.4.

    Nope. PHP 4.0.4 added the ability to use $ddd backreferences, but the "perl-style" of ${ddd} was not added until PHP 4.3.0.

    From here: http://www.php.net/ChangeLog-4.php
    Added ability to use Perl-style ${n} subpattern references in the replacement string for preg_replace() (bug #18442). (Andrei)

    So the short of it is: Upgrade your copy of PHP, for crying out loud! :)

  13. Nazgul
    Member
    Posted 8 years ago #

    If you need at least 4.3.0 to get this to work, somebody should also update the Requirements page, because there it says at least 4.2.0.

    But I'm not in a position to upgrade my PHP version, so I'll just have to live with my 'hack' in this, and possible future versions, for now.

  14. peter-b
    Member
    Posted 8 years ago #

    The hack seems to work OK - I'm not particularly familiar with php - what was the change meant to implement?

  15. stormbear
    Member
    Posted 8 years ago #

    The "\\1" fix helped my site out.

    Thanks!

  16. Samuel Wood (Otto)
    Tech Ninja
    Posted 8 years ago #

    what was the change meant to implement?

    It's a bugfix that is mostly intended for Non-English users. It won't impact English users *if* they have a version of PHP later than 4.3.0.

  17. slambert
    Member
    Posted 8 years ago #

    Allright, so what is the fix exactly? I don't understand what I am supposed to do. What do you change in what files?

    EDIT: Nevermind I found it above.

  18. Michael Adams (mdawaffe)
    Member
    Posted 8 years ago #

    Nazgul, a PHP 4.2 compatible solution has been found and will be included in subsequent releases of WP.

    http://trac.wordpress.org/ticket/2774

  19. peter-b
    Member
    Posted 8 years ago #

    I've found another oddity with WordPress 2.0.3 running under PHP 4.2.2

    I was recently adding a link with the link description including a ' mark (as in Fred's blog. This appeared in the sidebar as Fred/'s blog - ie, the escape character appeared. Editing it from within WordPress was impossible - in fact it then appeared as Fred///'s blog - so it seems to be escaping the escape character!

    A quick look in the database showed that the db table was storing the characters described, so it looks as if the problem is occuring in the input text processing. The workaraound was to edit the Mysql table directly (using phpMyAdmin)

    System is Linux RH9 running Apache 2, MySql 4 and php 4.2.2

  20. Nazgul
    Member
    Posted 8 years ago #

    peter-b, try installing the WordPress 2.0.3 Tuneup plugin. That should fix your problem.

Topic Closed

This topic has been closed to new replies.

About this Topic