Bug: Wrong URL in custom-styles.css

Reports about issues that you encounter in Suffusion
Forum rules
1. No offensive language and no mocking
2. Please do a thorough search before you post something. Trust us, there is a high probability that the question you are asking has been asked previously.
3. No soliciting. You cannot post here soliciting bids for people offer you quotes, or even offer money to people for some work. You will be moderated if you do so. If you are looking for help, please post your request on http://jobs.wordpress.net or http://codepoet.com
4. Please be reasonable. You are getting software and support. For free. Complicated requests from a general purpose theme are not welcome and some volunteers might lose patience with you.
5. Please do your due diligence. If you posted a query and we answered with a link, take the trouble to go through the link contents.
6. Please post with complete information. Requests for help MUST be accompanied with your URL, particularly if you are asking something like "Why am I seeing a blank space?"

Bug: Wrong URL in custom-styles.css

Postby raubvogel » 10 May 2012, 03:43

Hi Sayontan,

if I choose "Back-end -> Site Optimization -> Auto-generate the CSS and link it as a file (Low load on server, elegant page source code)", a file called "custom-styles.css" will be generated containing css for the icon set, i. e., something like background-image: url(https://blogsystem.nobodyknows.de/tc-st ... nset-2.png); The url should start with "http" not with "https". I think https is chosen because I’m logged in over https in the admin area. I have no valid certificate for https. Therefore FireFox, IE and Chrome will not load the icons. Could You please fix this?

Suffusion version: 4.2.0

Best regards
Ronny
raubvogel
 
Posts: 11
Joined: 10 May 2012, 03:33
Location: Berlin, Germany

Re: Bug: Wrong URL in custom-styles.css

Postby sayontan » 10 May 2012, 06:30

The URL is picked based on the Site URL you specify in the back-end of WordPress (not Suffusion). Suffusion has no control over the seurity protocol that you have set up.
Sayontan Sinha | http://mynethome.net/blog | http://www.aquoid.com/news
I don't do freelance work (for Suffusion or otherwise), so please don't contact me for quotes or offers.
sayontan
Site Admin
 
Posts: 10159
Joined: 15 Sep 2009, 16:39
Location: Houston, Texas

Re: Bug: Wrong URL in custom-styles.css

Postby raubvogel » 10 May 2012, 15:36

Hi Sayontan,

I'm using a Wordpress Network (multisite). Only the admin environmet is forced to be https. The public pages are all http. If I use the upload function (e.g. header image) in your configuration, a normal http-URL is generated, not a https one. I'm confused :D I will have a look at Your source code tomorrow …

EDIT:
- Looked at \wordpress\wp-content\themes\suffusion\suffusion-css-generator.php:943
- … .icon {
background-image: url(".get_template_directory_uri()."/images/$suf_iconset.png);
}
- I think get_template_directory_uri() cannot be correct here (returns https in admin environment). Any ideas?
- Hoever, get_template_directory_uri() is correct if the css is not generated (i.e., generated on the fly).

Greeting from Germany
Ronny
raubvogel
 
Posts: 11
Joined: 10 May 2012, 03:33
Location: Berlin, Germany

Re: Bug: Wrong URL in custom-styles.css

Postby raubvogel » 11 May 2012, 16:20

Hm, I have no idea what function has to replace get_template_directory_uri(). Fact: get_template_directory_uri() should not be used if style sheets or other code is generated from admin environment (-> https issue). This could be a general issue is Suffusion Theme …
raubvogel
 
Posts: 11
Joined: 10 May 2012, 03:33
Location: Berlin, Germany

Re: Bug: Wrong URL in custom-styles.css

Postby sayontan » 11 May 2012, 22:54

raubvogel wrote:This could be a general issue is Suffusion Theme …

:? :? Why? It is not a Suffusion function, hence it is not a Suffusion issue. If get_template_directory_uri() returns different results from your backend vs. the frontend, it is a WP issue, not a Suffusion issue. WP's recommended method to determine your theme folder is get_template_directory_uri() - the other replacements for it are not accepted by the theme reviewers.
Sayontan Sinha | http://mynethome.net/blog | http://www.aquoid.com/news
I don't do freelance work (for Suffusion or otherwise), so please don't contact me for quotes or offers.
sayontan
Site Admin
 
Posts: 10159
Joined: 15 Sep 2009, 16:39
Location: Houston, Texas

Re: Bug: Wrong URL in custom-styles.css

Postby raubvogel » 13 May 2012, 15:48

That not quite right, I think. You generate an url in the backend for the frontend. In the backend get_template_directory_uri() returns https://your-site/theme/… and in the frontend it returns http://your-site/theme/… It seems there is no appropriate function in wordpress for this case – I could not find one.
raubvogel
 
Posts: 11
Joined: 10 May 2012, 03:33
Location: Berlin, Germany


Return to Bug Reports

Who is online

Users browsing this forum: Bing [Bot] and 2 guests