• I’m just about to release WP-Andreas01, a new theme based on one of my open source website templates. In this theme, I have included code from a plugin to add a nice extra feature (a dynamic sub-page menu). When I posted the first public version of the theme (it can be downloaded from: http://andreasviklund.com/blog/webdesign/the-download-link/), I got reports that it works perfectly for most people. But some of the users (from what I could tell, about 10-15%) are reporting an error that makes the theme impossible to load.

    The error message (which appears at theme load) says: “Parse error: parse error, unexpected T_FUNCTION in /home/wp/public_html/wp-content/themes/wp-andreas01/functions.php on line 1”

    functions.php contains the hacked plugin code, and since my PHP skills are very limited I wouldn’t be surprised if I did something wrong. But noone has found any error in the file. It just doesn’t work for some people. The problems seems to go away if all plugins are de-activated and then re-activated again. Error in the file transfers and a possible UTF-8 byte order mark error are two suggestions I have got, but if it was an BOM error the theme shouldn’t work for anyone. Or am I wrong?

    What could cause this? What does the message mean? Any feedback would be very welcome, as I will probably need to remove the functions.php if I can’t find the error (if there is indeed any error).

Viewing 8 replies - 1 through 8 (of 8 total)
  • I tested it out with WP2.0.2 and found no issue. may be it is a problem for WP1.5 users ?

    Thanks

    Thread Starter andreasviklund

    (@andreasviklund)

    Hey, thanks! That was my first thought too. But the error has been reported by users of 2.0 as well.

    hey andreas, have you got my mail?
    it’s about the andreas theme – compactilble with wordpress 2.

    Thread Starter andreasviklund

    (@andreasviklund)

    Yes, got the e-mail. Will reply to it as soon as I can. Until then, check out http://kaushalsheth.com to download the “Exquisite” theme. It is partially based on the andreas02 template. I will make a complete port of andreas02 for WordPress once I have got WP-Andreas01 to work properly. With the “List Subpages” feature (based on a plugin by Rob Miller), I am pretty sure that it will be a useful theme for people who use the pages feature a lot.

    Any ideas, anyone?

    Thread Starter andreasviklund

    (@andreasviklund)

    Okay, the problem seems to be solved so the theme will now be officially launched. =)

    Can you share how it was solved ?

    Thread Starter andreasviklund

    (@andreasviklund)

    The PHP template file was saved in a Mac text file format. For some reason, this caused problems on some server configs – while it worked perfectly on others. When the template files were converted to Unix format, the theme worked perfectly for users who had problems with the previous version. Thanks to Ainslie Johnson of http://webgazette.co.uk/ who found the solution!

    Thread Starter andreasviklund

    (@andreasviklund)

    The conversion was made using Notepad++, my standard XHTML/CSS/PHP coding tool. It is a freeware editor that handles both character encoding changes and windows/unix/mac conversions.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘New theme (with a problem)’ is closed to new replies.