Upgrade breaks CSS link

I upgraded from 1.1.5 to 1.1.7 and now the links to the theme CSS-file comes out wrong. No matter what theme i choose the link to the CSS is "/gallery/themes/1/styles/light.css". Some how it is stuck on an incorrect link.

The php-pages change when i change theme. It's only the CSS that's wrong. When i upgraded the theme was set to my own theme (vediamo) that is a modification of the default-theme.

I tried to upgrade a test-gallery (older version) and got the same error. I made a fresh install in a new folder and that works with my own theme.

How do I get it unstuck? I tried to follow the code to see where it went wrong but I don't think know enough to find it.

Test-gallery: http://www.vediamo.se/zenphoto/

Comments

  • Somehow the theme path is ending up with "1" instead of your theme. Not sure how that might happen. But maybe if you change themes it will get corrected. Try changing the theme. If that works you can always change back.
  • rocc Member
    I did try changing the theme and it did not change the link. The strange thing was that I was using the dark.css file before the upgrade. Changing the "flavour" didn't change the link either. Some navigation links are also wrong. The gallery link is "http://www.vediamo.se/zenphoto/2007/<br /><b>Warning</b>: Division by zero in <b>/customers/vediamo.se/vediamo.se/httpd.www/zenphoto/zp-core/class-album.php</b> on line <b>776</b><br />/zenphoto/". I am sure now that it was the database that did not upgrade properly. Just strange that it happened twice, upgrading from different versions. I am sure I followed the instructions properly the second time.

    I have solved my problem now by making a new fresh install, restoring and then upgrading the database.
    The test gallery is still up if you want to have a look. http://www.vediamo.se/zenphoto
  • Glad you got it fixed. There really is nothing more I can learn from the bad installation. There is no way I can think of that the folder name of the theme could end up a '1'. But sounds like some sort of corrupted upload or something since it got fixed with a fresh installation.
  • I too had this problem when upgrading from 1.1.5 to 1.1.7. I'll try killing the whole thing and uploading again.

    ... yep that fixed it. I deleted the zp-core and theme subdirectories, along with all the files in the home directory, and reuploaded them. Strange... maybe it's a glitch specifically with the upgrade from 1.1.5 to 1.1.7.
  • Well, I'm not a tester so I don't think I can make a bugtrack entry, so here you go with this problem.

    The problem is in zp-core/functions.php, line 1198. $_zp_themeroot is globaled there, then modified to include $intheme argument. I had slideshow plugin enabled, which is intheme, so that argument was set to true (1). That's where the '1' in the css url comes from. $_zp_themeroot should not be global in the getPlugin function, or should not be modified.
  • `$intheme` is either `false` or is the name of the theme. It is never '1' unless you have a theme by that name. The only other possibility is that there was some file in your plugins folder that was causing the problem.
  • Hmmmm... thought I had it ;) Well I have a couple more to convert, I'll do some more digging!
Sign In or Register to comment.