Jump to content
  • 0

theme.css?dir= uncacheable


furioussnail

Question

6 answers to this question

Recommended Posts

  • 0
6 hours ago, furioussnail said:

I undestand the purpose of the theme.css file. The problem is caused by the "?dir=" query string added to the file:

<link href="/admin/theme/theme.css?dir=" rel="stylesheet" type="text/css" media="screen" />

I think the href should point to the file without "?dir=".

Thank you.

I don't know the reason ?dir= is appended to the file. I'll bring it up with the team. What kind of caching are you doing, and how is the resource interpreted? Does it assume that it's a dynamic resource, and does not cache it, or? If it was cached, a new theme would not be picked up until the cache expires. For the admin area, this is a problem if you have multiple companies and are switching between them. The URL would stay the same, but the company & theme would change.

Perhaps the file name should be THEMENAME.css

Link to comment
Share on other sites

  • 0

That is used when custom theme is set to load correct css...it is link generated by PHP, .when you use default theme then theme.css or theme.css?dir= will not cause any difference but if you switch to the custom theme than without dir= it will load default theme ...

You can find it in structure.pdt

        // Theme CSS
        if (isset($theme_css)) {
        ?>
        <link href="<?php $this->Html->_($theme_css);?>" rel="stylesheet" type="text/css" media="screen" />
     

 

Link to comment
Share on other sites

  • 0
17 hours ago, Paul said:

I don't know the reason ?dir= is appended to the file. I'll bring it up with the team. What kind of caching are you doing, and how is the resource interpreted? Does it assume that it's a dynamic resource, and does not cache it, or? If it was cached, a new theme would not be picked up until the cache expires. For the admin area, this is a problem if you have multiple companies and are switching between them. The URL would stay the same, but the company & theme would change.

Perhaps the file name should be THEMENAME.css

Yes, I think the theme should be set to theme.css, or custom-theme.css. I don't think web browsers understand the ?dev= part of that query.

Link to comment
Share on other sites

  • 0
On 8/23/2018 at 6:40 AM, Paul said:

I don't know the reason ?dir= is appended to the file. I'll bring it up with the team

from the code it appear that if the 'dir' is set in the url then system fetch the dir directory to retrieve theme.css from it. and i don't find in any part in blesta where to set this dir?!!!

maybe it was added for a future use ! but now it has no effect at all .

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...