• Resolved punkoblog

    (@punkoblog)


    So I was trying to edit formatting.php to change the default excerpt from 55 to 35, I just changed the numbers and uploaded the file. Afterwards I get this error:

    Parse error: syntax error, unexpected T_LNUMBER in /mnt/gs02/herd02/26608/domains/kindletank.com/html/wp-includes/formatting.php on line 98

    So I thought, well I will just change it back. Still get the error. I even uploaded a fresh copy of the file, and still the error shows up. I cannot even get into my dashboard.

    Any Ideas?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator Samuel Wood (Otto)

    (@otto42)

    WordPress.org Admin

    I even uploaded a fresh copy of the file, and still the error shows up.

    Are you using any sort of caching plugins? Or a browser cache? Have you tried hitting refresh a few times?

    Or perhaps your fresh copy wasn’t all that fresh?

    Failing all else, redownload the ZIP file from here and get a known good copy of the file, then upload that.

    Also, never hack the core files. Find another way. In this case, the other way would have been:
    a) Copy the whole wp_trim_excerpt function into your theme’s functions.php file, but with a new name like my_trim_excerpt.
    b) Modify your function to do 35 instead of 55.
    c) Add these lines to the theme’s functions.php file as well:

    remove_filter('get_the_excerpt', 'wp_trim_excerpt');
    add_filter('get_the_excerpt', 'my_trim_excerpt');

    Thread Starter punkoblog

    (@punkoblog)

    Thanks for your help!

    I have been reminded that when troubleshooting a problem, often times simple fixes are often hurried. At first when you said

    "Or perhaps your fresh copy wasn't all that fresh?"

    I thought to myself, “well yah”, and moved on to other issues. So I wasted another 30 minutes.

    Ultimately I found that I was uploading an edited copy of formatting.php when I thought it was untouched. I fixed the problem by redownloading wordpress, and replacing the whole “includes” folder.

    Voila!

    Thanks again!

    Roman Craigle

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Uh Oh! Crazy Error, Site is Down’ is closed to new replies.