• Resolved WxDaddy

    (@wxdaddy)


    After prompted to ‘upgrade themes’ in admin, my site is no longer visible via main site url or through admin. Parse error displays:

    Parse error: syntax error, unexpected T_STRING in /home/drift10/public_html/jb/wp-content/themes/suffusion/functions/media.php on line 372

    I unzipped and uploaded a “clean” version of the suffusion theme and I’m still getting the error. Any ideas on where to start?

    When trying to access admin page, I get this parse error:

    Parse error: syntax error, unexpected ‘(‘, expecting ‘}’ in /home/drift10/public_html/jb/wp-content/themes/suffusion/admin/suffusion-options-page.php on line 1356

Viewing 13 replies - 1 through 13 (of 13 total)
  • Which version of PHP are you on? I checked the lines you mentioned – they look clean and error-free.

    Thread Starter WxDaddy

    (@wxdaddy)

    PhP version 5.2.13

    If I were to hazard a guess I would say there is a conflict with the PHP version. Line 372 in media.php is:
    if ($new_img_path instanceof WP_Error) {
    This should work without hassles, but since it is not, is there any chance you might be able to switch to a newer version of PHP?

    Thread Starter WxDaddy

    (@wxdaddy)

    Thank you.

    I’ve contacted my host and will see if they can upgrade my php version.

    In the meantime, I’m still unable to access the blog except via ftp. Can I put the files of another template within the suffusion folder and expect it to work simply for the means of access?

    You can delete the entire Suffusion folder if you want, from wp-content/themes. You can then download the older version, unzip it, and copy the unzipped suffusion folder to wp-content/themes. If you don’t put in the older version of Suffusion after deleting the version that is causing you issues, you will still be fine because you will be switched to TwentyTen.

    I have the same problem, with PHP 5.2.17 installed (pair.com).

    I deleted Suffusion 3.7.5, and reinstalled 3.7.3.

    Could there be any other solution (in the event that my webhost won’t upgrade)

    thanks!

    I have the same problem, with PHP 4.4.0.

    … reinstalled 3.7.3.

    I fixed it (kinda).
    Since I don`t know why this theme should do image resizing, I disabled this function by making it return error by default.
    Line 372 now looks like:

    if (true) {

    but admin panel still does not work
    (my server does not show errors so I don`t know whitch line to fix)

    @explorer,

    Since I don’t know why this theme should do image resizing, I disabled this function by making it return error by default.

    Image resizing is used quite extensively for a lot of features in the theme, so if you are forcing an error, you will lose out on it. Examples of resizing are in Featured Content, the magazine template, excerpts etc.

    Here is some research done by a user on the theme forum: https://www.aquoid.com/forum/viewtopic.php?f=2&t=4201#p17619. Specifically with PHP 4.x you will have errors. One option is to use the older function is_a(). The way you would do it is to replace this line:

    if ($new_img_path instanceof WP_Error) {

    with this line:

    if (is_a($new_img_path, 'WP_Error')) {

    This might work.

    Regarding the control panel issue you fall in a small percentage of users who are facing a very weird bug. I have already released a workaround, so once it is approved you can download the new version.

    Sayontan.

    Alwyn Botha

    (@123milliseconds)

    Thread Starter WxDaddy

    (@wxdaddy)

    I had thought I was using php 5, but as it turns out my server was set to php 4. I switched it and now the suffusion theme is working just fine on my site.

    Thanks!

    So every theme I use do some image resizing (extensively)?
    I don`t have free space for that, that is bullshit.
    Was there anything wrong with version 3.7.3 I should know or I can keep it?

    So every theme I use do some image resizing (extensively)?
    I don`t have free space for that, that is bullshit.

    That’s funny – wonder how you have had space so far, then. Suffusion has had image resizing in place since version 3.2.2 released more than 13 months back, when it started using TimThumb. 3.7.3 was the last version to feature TimThumb, which now got phased out. Any decent theme you pick up will use explicit image resizing, either through WP’s native resizing capability (which will create more images than a script-based resizing), or a combination of the native resizing and some other scripts. A lot of the themes in the theme repository are using TimThumb, or have stopped using TimThumb recently in favour of native WP resizing. Look beyond the official repository and almost every theme you find will have TimThumb.

    Nothing wrong with 3.7.3 – you are free to use it, but never for once think that resizing is not happening there.

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Parse error after upgrading theme’ is closed to new replies.