New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compression breaks CSS when valid '//' are used #683

Closed
theolmue opened this Issue May 8, 2014 · 7 comments

Comments

Projects
None yet
4 participants
@theolmue

theolmue commented May 8, 2014

I did some changes in layout by using lib/tpl/vector/user/screen.css in Binky. This worked well. Today I upgraded to Ponder Stibbons. After that the configurations in lib/tpl/vector/user/screen.css are ignored. I checked, that the file is in place and unchanged. Any idea, whats wrong?

My screen.css:

/* en: Place for user defined CSS rules (screen media) - this file can safely be
   preserved when updating. See README for details.

   de: Ort für benutzerdefinierte CSS-Regeln (screen media) - Diese Datei kann
   beim Durchführen von Updates ohne Risiko beibehalten werden. Konsultieren Sie
   die README für Detailinformationen. */



/* Sidebar breiter machen (15em statt 10em) */
div#content,
#head-base,
div#footer,
div#panel,
#p-logo,
#p-logo a,
#left-navigation {
    margin-left: 15em !important;
}
@splitbrain

This comment has been minimized.

Show comment
Hide comment
@splitbrain

splitbrain May 8, 2014

Owner

Hmm. That location is not a standard location for user customization in DokuWiki. It might be handled by the template itself but I don't know how that would be affected by an upgrade.
@selfthinker any ideas?

Owner

splitbrain commented May 8, 2014

Hmm. That location is not a standard location for user customization in DokuWiki. It might be handled by the template itself but I don't know how that would be affected by an upgrade.
@selfthinker any ideas?

@Klap-in

This comment has been minimized.

Show comment
Hide comment
@Klap-in

Klap-in May 8, 2014

Collaborator

This is a feature of the vector template.
Please create a bug at https://github.com/arsava/dokuwiki-template-vector

(note: maybe it is cause by this change in the vector template: arsava/dokuwiki-template-vector@fede5d7 )

Collaborator

Klap-in commented May 8, 2014

This is a feature of the vector template.
Please create a bug at https://github.com/arsava/dokuwiki-template-vector

(note: maybe it is cause by this change in the vector template: arsava/dokuwiki-template-vector@fede5d7 )

@Klap-in Klap-in closed this May 8, 2014

@Klap-in

This comment has been minimized.

Show comment
Hide comment
@Klap-in

Klap-in May 8, 2014

Collaborator

In my test wiki, i cannot reproduce it so far.

Did you expire the dokuwiki caches and cleaned the browser cache after the update?
That is:

  • Go to Config Manager and use the Save button to resave the config. This expires the caches.
  • Nextly, reload the wiki in the browser with Ctrl+F5. This cleans the cache of the browser.
Collaborator

Klap-in commented May 8, 2014

In my test wiki, i cannot reproduce it so far.

Did you expire the dokuwiki caches and cleaned the browser cache after the update?
That is:

  • Go to Config Manager and use the Save button to resave the config. This expires the caches.
  • Nextly, reload the wiki in the browser with Ctrl+F5. This cleans the cache of the browser.
@Klap-in

This comment has been minimized.

Show comment
Hide comment
@Klap-in

Klap-in May 8, 2014

Collaborator

Vector includes currently the style files by https://github.com/arsava/dokuwiki-template-vector/blob/master/style.ini
So at the first sight there are no custom mechanisms that i would suspect to give troubles.

So when you are still affected after refreshing the cache, please report it the bug tracker of the Vector template.

Collaborator

Klap-in commented May 8, 2014

Vector includes currently the style files by https://github.com/arsava/dokuwiki-template-vector/blob/master/style.ini
So at the first sight there are no custom mechanisms that i would suspect to give troubles.

So when you are still affected after refreshing the cache, please report it the bug tracker of the Vector template.

@Klap-in

This comment has been minimized.

Show comment
Hide comment
@Klap-in

Klap-in May 12, 2014

Collaborator

This issue seems caused by the url-rewriter in the DokuWiki's css-compressor.

A faulty snippet is from static/3rd/vector/main-ltr.css#L999 of the vector template:

div#content a.external,
div#content a[href ^="gopher://"] {
    background: url(static/3rd/vector/external-link-ltr-icon.png) center right no-repeat;
    padding: 0 13px 0 0;
}
div#content a[href ^="https://"],
.link-https {
    background: url(static/3rd/vector/lock-icon.png) center right no-repeat;
    padding: 0 13px 0 0;
}
div#content a[href ^="mailto:"],
.link-mailto {
    background: url(static/3rd/vector/mail-icon.png) center right no-repeat;
    padding: 0 13px 0 0;
}
div#content a[href ^="news://"] {
    background: url(static/3rd/vector/news-icon.png) center right no-repeat;
    padding: 0 13px 0 0;
}
div#content a[href ^="ftp://"],
.link-ftp {
    background: url(static/3rd/vector/file-icon.png) center right no-repeat;
    padding: 0 13px 0 0;
}
div#content a[href ^="irc://"],
div#content a.extiw[href ^="irc://"],
.link-irc {
    background: url(static/3rd/vector/talk-icon.png) center right no-repeat;
    padding: 0 13px 0 0;
}

This is compressed to:

div#content a.external,div#content a[href ^="gopher:background:url(/wiki/lib/tpl/vector/static/3rd/vector/external-link-ltr-icon.png) center right no-repeat;padding:0 13px 0 0;}div#content a[href ^="https:.link-https{background:url(/wiki/lib/tpl/vector/static/3rd/vector/lock-icon.png) center right no-repeat;padding:0 13px 0 0;}div#content a[href ^="mailto:"],.link-mailto{background:url(/wiki/lib/tpl/vector/static/3rd/vector/mail-icon.png) center right no-repeat;padding:0 13px 0 0;}div#content a[href ^="news:background:url(/wiki/lib/tpl/vector/static/3rd/vector/news-icon.png) center right no-repeat;padding:0 13px 0 0;}div#content a[href ^="ftp:.link-ftp{background:url(/wiki/lib/tpl/vector/static/3rd/vector/file-icon.png) center right no-repeat;padding:0 13px 0 0;}div#content a[href ^="irc:div#content a.extiw[href ^="irc:.link-irc{background:url(/wiki/lib/tpl/vector/static/3rd/vector/talk-icon.png) center right no-repeat;padding:0 13px 0 0;}

The original css was valid css, isn't?
In that case DokuWiki's compressor needs a fix.

Collaborator

Klap-in commented May 12, 2014

This issue seems caused by the url-rewriter in the DokuWiki's css-compressor.

A faulty snippet is from static/3rd/vector/main-ltr.css#L999 of the vector template:

div#content a.external,
div#content a[href ^="gopher://"] {
    background: url(static/3rd/vector/external-link-ltr-icon.png) center right no-repeat;
    padding: 0 13px 0 0;
}
div#content a[href ^="https://"],
.link-https {
    background: url(static/3rd/vector/lock-icon.png) center right no-repeat;
    padding: 0 13px 0 0;
}
div#content a[href ^="mailto:"],
.link-mailto {
    background: url(static/3rd/vector/mail-icon.png) center right no-repeat;
    padding: 0 13px 0 0;
}
div#content a[href ^="news://"] {
    background: url(static/3rd/vector/news-icon.png) center right no-repeat;
    padding: 0 13px 0 0;
}
div#content a[href ^="ftp://"],
.link-ftp {
    background: url(static/3rd/vector/file-icon.png) center right no-repeat;
    padding: 0 13px 0 0;
}
div#content a[href ^="irc://"],
div#content a.extiw[href ^="irc://"],
.link-irc {
    background: url(static/3rd/vector/talk-icon.png) center right no-repeat;
    padding: 0 13px 0 0;
}

This is compressed to:

div#content a.external,div#content a[href ^="gopher:background:url(/wiki/lib/tpl/vector/static/3rd/vector/external-link-ltr-icon.png) center right no-repeat;padding:0 13px 0 0;}div#content a[href ^="https:.link-https{background:url(/wiki/lib/tpl/vector/static/3rd/vector/lock-icon.png) center right no-repeat;padding:0 13px 0 0;}div#content a[href ^="mailto:"],.link-mailto{background:url(/wiki/lib/tpl/vector/static/3rd/vector/mail-icon.png) center right no-repeat;padding:0 13px 0 0;}div#content a[href ^="news:background:url(/wiki/lib/tpl/vector/static/3rd/vector/news-icon.png) center right no-repeat;padding:0 13px 0 0;}div#content a[href ^="ftp:.link-ftp{background:url(/wiki/lib/tpl/vector/static/3rd/vector/file-icon.png) center right no-repeat;padding:0 13px 0 0;}div#content a[href ^="irc:div#content a.extiw[href ^="irc:.link-irc{background:url(/wiki/lib/tpl/vector/static/3rd/vector/talk-icon.png) center right no-repeat;padding:0 13px 0 0;}

The original css was valid css, isn't?
In that case DokuWiki's compressor needs a fix.

@Klap-in Klap-in added the Bug label May 12, 2014

@selfthinker

This comment has been minimized.

Show comment
Hide comment
@selfthinker

selfthinker May 12, 2014

Collaborator

Yup, that is valid CSS. And the compression is broken. Therefore a simple "fix" would be to disable it [https://www.dokuwiki.org/config:compress]. I can imagine this was either introduced with fe5a50c or 98cb860.

I will change the title of the ticket to reflect what's broken.

Collaborator

selfthinker commented May 12, 2014

Yup, that is valid CSS. And the compression is broken. Therefore a simple "fix" would be to disable it [https://www.dokuwiki.org/config:compress]. I can imagine this was either introduced with fe5a50c or 98cb860.

I will change the title of the ticket to reflect what's broken.

@selfthinker selfthinker changed the title from lib/tpl/vector/user/screen.css ignored in Ponder Stibbons to Compression breaks CSS when valid '//' are used May 12, 2014

@splitbrain

This comment has been minimized.

Show comment
Hide comment
@splitbrain

splitbrain May 13, 2014

Owner

Yeah fe5a50c seems to be the problem. I guess that function needs to check for strings as well. I will have a look.

Owner

splitbrain commented May 13, 2014

Yeah fe5a50c seems to be the problem. I guess that function needs to check for strings as well. I will have a look.

@splitbrain splitbrain self-assigned this May 13, 2014

splitbrain referenced this issue May 14, 2014

don't treat double slashes as comments when used in string
This avoids treating double slashes as single line comments in CSS when
they are used in a filter or content string.

closes #638

@splitbrain splitbrain closed this May 14, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment