Link to home
Start Free TrialLog in
Avatar of Colebert
Colebert

asked on

Wordpress CSS Code & Windows DNS Issue

We have third-parties who have developed a wordpress site for us. They delivered a website with some references in the source code that are causing problems for me on my internal active-directory integrated network. I don't know if this is something they can fix or not.

The specific problem is that some stylesheets references in the code refer to www.MYDOMAIN.com and other reference just MYDOMAIN.com (no www.) See link below. (contains my domain name so you can see the website)

http://s15.postimg.org/v2afztjh7/stylesheet_problem.png

Note that some are WWW.DOMAIN.COM and only five are not.  I have to believe those can be changed?

In my internal network I have not been able to assign an ip address to the root domain (DOMAN.com.) So these stylesheets are broken and make our website appear broken to the internal users on my network (but fine outside of my network.)  I setup a wildcard in my Server 2012 R2 DNS server but it still points the main domain to the IP address of a DC controller.

http://s12.postimg.org/83wzf6pjh/resulting_issue.png

The third-party is saying that it may not be fixable and a wordpress issue. Since I do not know enough about the mechanics of wordpress, I wanted to see if someone knew if that is true or not.  The third party also has complete control over the wordpress backend so I can't even get in to verify anything they have done.   They have implied my request is asking to fundamentally change Wordpress code.

What do I need to do change those five DOMAIN.com references to http://www.DOMAIN.com and leave the rest along. Possible? If so, where do I tell my vendor to go to do it?

Also filing this under DNS issues in case someone has a brilliant way for me to workaround the problem in my DNS server.

I'll accept for an answer one of the following:

1. How to handhold my vendor through changing the link in wordpress from DOMAIN.COM to WWW.DOMAIN.COM.
2. How to get my Windows DNS servers to resolve the root domain to an IP address other than my DCs without screwing up my network.
3. Something else approximating a fix for the problem (Not rename my active directory domain)

Thanks!
Avatar of William Nettmann
William Nettmann
Flag of South Africa image

This is not a "WordPress issue: as such, but more likely a poor coding issue.

Without knowing what the third party did, it is very difficult to come up with a complete solution, but I am guessing that the third party developed a theme or a plugin, which is loading the five style sheets which are not being found.

If this is the case, it appears that they hard coded the link for the style sheets, instead of using a WordPress function to return the appropriate link.

The correct code would have been something like
<?php $url = content_url("/uploads/wp-less/dt-the7/css/stylesheetname.css"); ?>

Open in new window

This would return the correct URL for the style sheet, to match the site's URL.
Avatar of Colebert
Colebert

ASKER

Thanks William.

It's not that they are missing, but rather because they refer to DOMAIN.COM instead of WWW.DOMAIN.COM they don't work inside my company's LAN.

Do you know where in the wordpress admin I would look to try to find that code?  I have poked around in appearances and themes but I'm not sure where I would go to try to find the place to modify it.
I understand that they are not missing, the URL is incorrect - it should be "www.domain.etc." The reason it is incorrect is as I described it above, or something very similar - without seeing the actual code behind the site, it is not possible to be 100% sure.

You are unlikely to find that code in the admin area. The third party would need to fix the code.

I seems that they are using a plugin called "WP-Less". It may even be an issue within that plugin. You could try reaching out to the plugin authors: https://wordpress.org/plugins/wp-less/
Avatar of DrDave242
You've identified the problem exactly. Unfortunately, I'm not a WordPress expert. The only thing I can add is that there's no way to do this:

2. How to get my Windows DNS servers to resolve the root domain to an IP address other than my DCs without screwing up my network.
From an AD/DNS perspective, I'm afraid it's working as designed. Within an AD domain, queries for the domain name are supposed to resolve to the IP addresses of the DCs, and I wouldn't go messing with those blank host records. Even if you were to delete all of the existing ones, the DCs would simply re-register them sooner or later.

In short, you're on the right track: getting someone to modify the site code is exactly what needs to be done, as it's the only way to fix the problem without renaming the internal domain. Unfortunately, I can't give you any advice on getting that done.
Thanks!  The dev resolved it by talking to their third-party support
This question needs an answer!
Become an EE member today
7 DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform.
View membership options
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.