WordPress.org

Forums

New theme (with a problem) (9 posts)

  1. andreasviklund
    Member
    Posted 9 years ago #

    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).

  2. sadish
    Member
    Posted 9 years ago #

    I tested it out with WP2.0.2 and found no issue. may be it is a problem for WP1.5 users ?

    Thanks

  3. andreasviklund
    Member
    Posted 9 years ago #

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

  4. parisgv
    Member
    Posted 9 years ago #

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

  5. andreasviklund
    Member
    Posted 9 years ago #

    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?

  6. andreasviklund
    Member
    Posted 9 years ago #

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

  7. VaamYob
    Member
    Posted 9 years ago #

    Can you share how it was solved ?

  8. andreasviklund
    Member
    Posted 9 years ago #

    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!

  9. andreasviklund
    Member
    Posted 9 years ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Topic