Jump to content

Archived

This topic is now archived and is closed to further replies.

mtaus

Icons Missing

Recommended Posts

mtaus

I had a Root Relative plugin installed in a site and when I removed it the DMS icons disappeared. All the other links seem to be fine. Any suggestions on how to repoint those icon URLs?

 

skitch.png

Share this post


Link to post
Share on other sites
greenfly

Hi Mtaus

 

Do you have a link to the site in question so we can take a look please? 


The answer to many issues can be found by searching in the forum before posting as someone else  may very well have had the same problem before you have.  Also, reading the documentation can help you gain a good understanding of how everything works. 

 

Please do not send me private messages. Occam's razor - The principle states "Keep things simple!"

Share this post


Link to post
Share on other sites
Danny

Hi,

 

What did the plugin do, as that is most likely the cause of the issue, you will probably want to contact the creator of the plugin for support.


Please search our forums, before posting!

Share this post


Link to post
Share on other sites
James B

The font awesome icons are part of the core files, as long as files are hosted on the same domain then installing a fresh version of DMS I would imagine would correct the problem. 


Kindly search the forum and read the documentation before posting. It will help you resolve many issues.

For CSS help be sure to check out W3Schools first and be sure to download FireBug for FireFox for troubleshooting.

James B

Share this post


Link to post
Share on other sites
mtaus

James B I reinstalled the theme, but the icons are still not appearing.

Share this post


Link to post
Share on other sites
Danny

The issue is most likely related to your setup, you will need to contact your host for assistance.


Please search our forums, before posting!

Share this post


Link to post
Share on other sites
mtaus

Danny I've got several DMS sites hosted at Rackspace Cloud and they're all performing more or less as expected. Any ideas how to fix this? The social icons are also missing here: http://www.bloomwellbend.com/news/

Share this post


Link to post
Share on other sites
mtaus

I'm getting the following errors in the console:

 

Share this post


Link to post
Share on other sites
Danny

Im not seeing any errors in my browsers console. Therefore, can you copy the errors so they appear as full text so we can see the full URL.

 

However, as you can probably already tell, the URL is showing http://wp-content

 

Thats your issue right there, it thinks your the location where the resources are loading from is http://wp-content/...

 

This is likely caused by either a plugin, permalinks, site URL options or your server configuration.


Please search our forums, before posting!

Share this post


Link to post
Share on other sites
mtaus

Danny I'm not sure why you're not seeing those errors, as I see them in every browser.

 

I searched the DB and found several places where the link structure looked like this '///wp-content/' so I switched it to '../wp-content/'... but it's still not working.

 

Is this change correct?

Can you tell me where in DMS these links can be found?

Share this post


Link to post
Share on other sites
mtaus

Any suggestions on how to fix these broken URLs would be greatly appreciated.

Share this post


Link to post
Share on other sites
James B

Hi there, unfortunately I'm not aware where this would be held in the database table as we don't usually deal with any form of database amendment as its outside of our support spectrum. I'll ask the developer team though to see if they can advise further to determine where you might find this.


Kindly search the forum and read the documentation before posting. It will help you resolve many issues.

For CSS help be sure to check out W3Schools first and be sure to download FireBug for FireFox for troubleshooting.

James B

Share this post


Link to post
Share on other sites
James B

The only other place I can think to check would be the htaccess file in case the rewrite rule or reference to it is in there.


Kindly search the forum and read the documentation before posting. It will help you resolve many issues.

For CSS help be sure to check out W3Schools first and be sure to download FireBug for FireFox for troubleshooting.

James B

Share this post


Link to post
Share on other sites
mtaus

James B I'll check, but I don't think this is an htaccess issue as it is only affecting fontawesome. 

 

I'd be grateful if you could check with your dev team so I could sort this out.

Share this post


Link to post
Share on other sites
Danny

This issue isn't related to DMS, it was caused by you using a Root relative plugin which must have changed something. Especially as the error you posted, is clearly causing the problem.

 

You can't get font awesome, when the URL is looking for http://wp-content/...

 

So you're going to need to either install the plugin again and see if this resolves your issue, then see if it contains options to revert your settings back or you will need to contact the developer of the plugin.

 

We can't really assist you when a third party plugin has caused the issue, especially one that none of us have used.


Please search our forums, before posting!

Share this post


Link to post
Share on other sites
mtaus

Danny I understand the cause of the problem. However, you mentioned above that you would check with the dev team to see if they could identify the source for what's generating this error. Have you been able to do that? If I know where's it wing triggered, I can try to fix it.

Share this post


Link to post
Share on other sites
Simon
The urls are set in the LESS variables functions. There is a filter you can use..

pless_vars

Example of completely untested code:
[ptiframe]4-78n0rv[/ptiframe]

Share this post


Link to post
Share on other sites
mtaus

I was able to fix this. Essentially, it looks like Pagelines is creating a new set of relative link references such as plCrossRoot, which it writes during the initial setup. The offending line of code was located in dms/less/icons.less and reads:

 

@iconFont: "@{plCrossRoot}/fonts/fontawesome-webfont";
 
I replaced the relative reference with an absolute and it's working now.
 
I do think that it's odd that this URL doesn't simple reference the current WP URL structure, but perhaps there are other issues I'm unaware of.

Share this post


Link to post
Share on other sites
Simon
No, PageLines is not creating any relative urls... if you traceback...

@iconFont is "@{plCrossRoot}/fonts/fontawesome-webfont"; right?
@plCrossRoot uses get_template_directory_uri() which is a wp function that returns the absolute url to the current theme.

Your plugin however is making get_template_directory_uri() return a relative url.

The filter I posted fixes that.

By editing a core less file you are locked into not being able to update, or remembering to edit that file every time you do update.

Share this post


Link to post
Share on other sites
mtaus

Simon_P

 

Everytime PL does a theme update, this issue resurfaces. I'm wondering if I can force this by adding the following custom LESS:

 

 
I've attempted to add this to the custom LESS panel, but it's not working. Do I need to add !Important or something else?
 
Thanks in advance.

Share this post


Link to post
Share on other sites
21thirteen

I've experienced this issue a couple of times after migrating a DMS2 site to the client's server. I'm not a code guy but this solution has worked every time: I use Yoast SEO anyway for all my client's sites and I used the editor in that plugin to edit the .htaccess file, but as long as you can get to the .htacces file, just put this in there at the bottom of the file underneath everything else (works like a charm!):

 

<FilesMatch ".(ttf|otf|eot|woff)$">
  <IfModule mod_headers.c>
    Header set Access-Control-Allow-Origin "*"
  </IfModule>
</FilesMatch>

Share this post


Link to post
Share on other sites

×