It mostly works great, but I did notice a bug and could replicate it in your demo - http://www.zwahlendesign.ch/drupal7/

1) Select anything other than the Standard page style.
2) Click on a link & wait for the page to reload
3) Click on Standard

The page won't change to the standard, it will change back to whatever style you entered the page with.

When you click out to the next page the Standard css is applied but not before that.

This behaviour is not consistent.

Comments

mrfelton’s picture

slackrunner’s picture

I have the same exact issue. Subscribing.

CZ’s picture

The module is designed out of the box, so we have to use the strongest CSS value "!important" to overwrite the used theme. It is only a problem by using Javascript and without reloading of the page.

Disable JavaScript (like in "Text Size") and reload the page can be a solution. Or arrange the theme and the Page Style CSS to fix this bug.

mgifford’s picture

Please demonstrate how that can be done in your demo. Currently it still seems to be an issue with your demo.

CZ’s picture

The demo pages are up to date (Drupal 7.7, Page Style 7.x-1.0).

Hack the file pagestyle.module on line 372 to:

    // drupal_add_js(drupal_get_path('module', 'pagestyle') . '/jquery.pagestyle.js');

See this hack now on the Drupal 7 Demo http://www.zwahlendesign.ch/drupal7/

CZ’s picture

Status: Active » Needs review

Try using Firefox 5.0 or higher. Seems to be working (on the Drupal 6 Demo).

mgifford’s picture

Seems to work in Chrome & FF 5.x now. So is the change to comment out line 372 going to be coming in a future release? Is it in the dev version already?

CZ’s picture

It works in FF 5 and FF 6 (Linux) and Chromium 12.0.742.112 (Linux) on Drupal 6.22 and Page Style 6.x-1.9 (not developer version). BUT not in Drupal 7.7 and Page Style 7.x-1.0. It can be a bug in the default theme of Drupal 7.

CZ’s picture

Status: Needs review » Needs work

Tested on FF 7.0.1 in Drupal 7.8 with the themes "zen" and "genesis". So maybe a jQuery bug and not a theme bug?

CZ’s picture

Status: Needs work » Fixed

Fixed.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

rviner’s picture

I'm using Drupal 7.18 with the Zen theme and I would like to use the JavaScript way of switching between the page styles.

However I'm experiencing the same issue where I can't change back to the standard page style once a new page has been requested. I noticed the same thing is happening on your Drupal 7 test site. Is it possible to apply a fix for this?

rviner’s picture

Status: Closed (fixed) » Active

Reopened due to response in #12

reswild’s picture

Status: Active » Needs review
StatusFileSize
new1.33 KB

The problem is that the classes in the links to the CSS files are missing in the D7 version, and the JavaScript needs these in order to switch correctly beteen the page styles.

I'm attaching a patch for this.

mgifford’s picture

Issue summary: View changes
Status: Needs review » Reviewed & tested by the community

This looks good to me. Fixes the problem I was having which caused me to disable this module.

kiralyj’s picture

#14 patch is ok.

  • CZ committed c92f4c8 on 7.x-1.x
    Issue #1184054 by mrfelton. Fixed: Can't switch back to Standard
    
CZ’s picture

Status: Reviewed & tested by the community » Closed (fixed)