Temp URL works... Regular URL WIll not show website: opencart

Category: Opencart

richmondarn
Asked:
2013-09-10 1:08 pm EST

Hits: 1,098
I moved my opencart website from my development website over to inmotion.

http://biz142.inmotionhosting.com/~larand5/

The temp URL worked perfectly. When I switched the DNS to inmotion, my menu bars all loaded but no products or products categories. It was essentially and empty website. I just switched the DNS back for now but if you look soon the website is larandproducts .com

What could the problem be?

You must login before you can ask a follow up question.

You must login before you can submit an answer.

OTHER ANSWERS

0

JacobIMH
Staff
9,968 Points
2013-09-10 2:17 pm EST
Hello richmondarn, and thanks for your question.

This is a very odd probably, as typically you'll have issues with things not displaying properly on the temporary URL, but when using the full domain they work fine.

I pulled up Google Chrome's developer tools and found that it seems on the temporary URL version of your site the following files are being included, that are not even attempting to get written into the HTML on the full domain version of the site:

carousel.css
flexslider.css
jquery.cycle.js
jquery.dcjqaccordion.js
jquery.flexslider-min.js
jquery.jcarousel.min.js


I've been looking at this for a bit, and haven't come across any reasoning yet why this would be happening. What's extra strange is the fact if you take carousel.css for instance it is being included over the Temp URL like:

http://biz142.inmotionhosting.com/~larand5/catalog/view/theme/bigshop/stylesheet/carousel.css


But it works perfectly fine over the full domain as well:

http://www.larandproducts.com/catalog/view/theme/bigshop/stylesheet/carousel.css


So it would seem that there is some JavaScript that isn't running that is triggering the include of these various CSS stylesheets and JavaScript files when using the full domain name.

I did some poking around, and actually got it to work for you by modifying your _store MySQL database table, and changing the url for the store from http://larandproducts.com/ to http://biz142.inmotionhosting.com/~larand5/.

I'll admit I have no clue why this is working, as the exact opposite behavior is to be expected. Also strange enough if I setup a cronjob to simply run PHP directly on your index.php file and output it to an HTML file, it has all of the data.

I'm assuming something might have been done either in your development process, or switching it over to our server where the temporary URL somehow became integrated as the expected real domain name. Although I don't see it anywhere in your database, or in any of the config files, so I am at a bit of a loss.

But anyways at least it seems to be working now! One other interesting thing of note, if you go to System > Settings in your admin dashboard. You have 2 stores setup with identical info it looks like, and the top one is enabled indicated by the (Default) text.

However if you click on Edit for that one, you'll notice it starts off with setting the Store Name. Where as if you go back and choose the other store that isn't enabled, it begins with the Store URL.

So I definitely feel that something a bit out of the ordinary is going on here. If you happen to have any insight to share on what in the development process you think might have caused this strange behavior I'd be really interested to know cause this one is a real head scratcher!

If you had any other questions at all as well please let us know!

- Jacob

You must login before you can post a comment about this answer.

I don't understand anything you just wrote but my website works!

Since you took your time to answer this question, I will take my time to explain how the website was developed since you are curious.

First of all. This is my first time working with OpenCart, so I am def a noob.

I built the opencart website on justhost. The only major modification we did to the website was changing some of the URL's manually in the menu. Everything worked fine though on the devlopment website.

My client, a friend of mine, had his hosting on network solutions so, hearing it is a pain to move opencart websites, I paid someone to move it for me. He forgot to change the config files so when I was trying to process orders everything was running through the development site url. I thought I had to change the store name in the admin panel. I couldn't change it so I created the second store before realizing I needed to Update the configuration files config.php and admin/config.php to reflect my domain path. That is why you see two stores.

So anyways. When the guy moved the website to network solutions he accidentally deleted another website that was hosted there. I didn't have those files so, I did a restore on the hosting account to a few days back. The other website was back up, but of course the new opencart was not there any more.

I had him move it a second time but he could not get it working. So I hired another guy to move it. He struggled to move it but got it working. When I tested the website... it was very buggy. Lots of errors..

I researched opencart and hosting and I learned that network solutions didn't work well with opencart. I also read that inmotion and opencart play well together.

So I opened an inmotion acount. I hired a third person to move the website from the development website to inmotion. Everything worked great on the temp URL but when I swtiched the DNS, we ran into this problem.

So, that has been my last week. Let me know if you have any questions or suggestions and thanks again for helping me!
richmondarn
13 Points
2013-09-10 2:44 pm EST
Hello richmondarn,

Haha sorry I probably did start to ramble on a bit in technical jargon. But basically I suspect after hearing your story which I really appreciate you cluing me in on, that more than likely somewhere in the migration process some manual edits might have been made to try to get things working to no avail.

I've encountered a problem similar to this a lot, where people will develop their site using the temp URL, switch it to the live domain, and then it's broke. Usually you just change the site's URL to the full domain and it works again. But I still don't know how with your site set as the temp URL it's deciding to use the full URL.

Anyways just for future reference to make things a bit easier on yourself, I always recommend when doing any sort of development to usually bypass temporary URLs altogether. Instead you can simply modify your computer's hosts file to force your computer to resolve the full domain name at which ever provider you see fit.

You can just delete the edits you made to your hosts file, and your computer will start going back out to the Internet's DNS system to lookup the real live host for the site. Testing things out this way ensures when it comes time to pull the switch on the DNS update there won't be any unexpected nuances awaiting you.

I'm glad you stumbled upon us and we were able to get your issues resolved. Feel free to stop in anytime if you run into any further issues!

- Jacob
JacobIMH
9,968 Points
Staff
2013-09-10 3:10 pm EST
Hello richmondarn,

I just sent you a separate email directly to you, as I think I have a clearer understanding of what is going on with your site now. But the info doesn't need to be public.

- Jacob
JacobIMH
9,968 Points
Staff
2013-09-10 3:38 pm EST
Like this Question?

Related Articles

It looks like there are no related articles.
Would you like to ask a question about this page? If so, click the button below!
Ask a Question

Need more Help?

Search

Ask the Community!

Get help with your questions from our community of like-minded hosting users and InMotion Hosting Staff.

Current Customers

Chat: Click to Chat Now E-mail: support@InMotionHosting.com
Call: 888-321-HOST (4678) Ticket: Submit a Support Ticket

Not a Customer?

Get web hosting from a company that is here to help. Sign up today!