Community @ The Turning Gate

Support community for TTG plugins and products.

NOTICE

The Turning Gate's Community has moved to a new home, at https://discourse.theturninggate.net.

This forum is now closed, and exists here as a read-only archive.

  • New user registrations are disabled.
  • Users cannot create new topics.
  • Users cannot reply to existing topics.

You are not logged in.

#1 2016-06-13 01:54:02

tonesshots
Member
Registered: 2012-11-22
Posts: 43

system does not error on bad /Gallery URL's after migration from test

I had built and tested an upgraded site on a subdomain. I have spent a good deal of time on this. All seemed very solid and met my requirements so I decided to migrate to my main site with the test site body. The migration went well with no major problems and all seemed fine until I accidently tried to open a non existing gallery page on the live site using a URL that related to my original CE4 site with the same top Galleries directory. Instead of getting an error message like "Somethings gone wrong" the site ended up in an unstable state with the root of /galleries open showing sub gallery thumbnails

Any other invalid directory than under /galleries causes an error message.

Here are the things I have tried in order to resolve this unexpected snag.


Re-publishing the galleries that were on my test site to the live site.
Removing the subdomain in which my test site was built
Clearing the template cache in designer
Deleting all browser caches on my local machines
Testing with other PC's and tablet devices - same results.
Tried the same erroneous /Gallery/rubbish/  URL's with Rod Barbee's test site - no similar problem here.

Here is the URL to my live site

http://ajpphotography.co/

Offline

#2 2016-06-13 02:13:43

rod barbee
Moderator
From: Port Ludlow, WA USA
Registered: 2012-09-24
Posts: 17,830
Website

Re: system does not error on bad /Gallery URL's after migration from test

other than a broken web fonts issue on your home page and albums, I'm not seeing any problem with your site

Is there a specific url to look at that will trigger the problem?


Rod 
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site

Offline

#3 2016-06-13 03:15:06

tonesshots
Member
Registered: 2012-11-22
Posts: 43

Re: system does not error on bad /Gallery URL's after migration from test

Thanks for looking Rod

Try ajpphotography.co/galleries/rubbish For me this brings up galleries and does not error to indicate the folder does not exist
Also from my blog try any of the links under the main entries which linked back to my original ce4 site. These do not cause an error here either but bring up a top level gallery page with corruptions such as the social media buttons are wrongly coloured and not centred as they normally are.

Offline

#4 2016-06-13 03:40:53

tonesshots
Member
Registered: 2012-11-22
Posts: 43

Re: system does not error on bad /Gallery URL's after migration from test

Also see email I have just sent you with screen shot of what happens if I use this URL
http://ajpphotography.co/galleries/rece … park-2016/

This was an album that existed in my old CE4 site ( which also used galleries as the top level directory for the album and album sets)
Tony P

Offline

#5 2016-06-13 04:02:07

tonesshots
Member
Registered: 2012-11-22
Posts: 43

Re: system does not error on bad /Gallery URL's after migration from test

Rod
I just visited my neighbour ( Very pleased to see me and gave me a glass of very nice red wine) anyway tested the two examples above on their PC ( has a different IP and has never visited my site before) and the same anomalies were exhibited there. I conclude from this test that it is not some local caching issue at my installation here.

Tony P

Offline

#6 2016-06-13 04:34:06

tonesshots
Member
Registered: 2012-11-22
Posts: 43

Re: system does not error on bad /Gallery URL's after migration from test

I read  tomowensphoto story of his migration and tested a non existent URL in his galleries tree and I got a similar result to mine. I used galleries/rubbish here and it did not produce an error on his site either.

Offline

#7 2016-06-13 04:51:28

tonesshots
Member
Registered: 2012-11-22
Posts: 43

Re: system does not error on bad /Gallery URL's after migration from test

Another clue to add here. I restarted my test site and I note that the problem with not trapping invalid URL's in the galleries tree was also here. I had not noticed it before so it may not be related to my migration to a live site.
Going to bed now. tone the tired of sitting in front of these screens. Good Night all.
Tony P

Offline

#8 2016-06-13 05:36:55

rod barbee
Moderator
From: Port Ludlow, WA USA
Registered: 2012-09-24
Posts: 17,830
Website

Re: system does not error on bad /Gallery URL's after migration from test

I think Ben will need to look at this. I also don't think it's a good idea to mix old CE4 albums and Backlight albums in the same top-level directory. Any CE4 albums in that directory should have been migrated to Backlight control prior to adding Backlight albums and sets.


Rod 
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site

Offline

#9 2016-06-13 05:56:52

tonesshots
Member
Registered: 2012-11-22
Posts: 43

Re: system does not error on bad /Gallery URL's after migration from test

Just to clarify a point here Rod. My galleries directory only has backlight material in it. I started afresh both with my test site and when I migrated to the live site. The top level directory for Ce4 was by default /galleries and so it is also by default in backlight.
Tony p

Offline

#10 2016-06-13 08:07:36

Ben
Moderator
From: Melbourne, Australia
Registered: 2012-09-29
Posts: 4,399

Re: system does not error on bad /Gallery URL's after migration from test

Hi Tony, this can be fixed with the following steps:

Edit the htaccess setting, disable the last three lines so that they look like:

	#RewriteCond %{REQUEST_FILENAME} !-f
	#RewriteCond %{REQUEST_FILENAME} !-d

	#RewriteRule ^(.*)$ %{ENV:BASE}index.php?%{ENV:QS}&page=$1 [QSA,L]

Then update the album files via the Publisher landing page.

Offline

#11 2016-06-13 08:09:20

Ben
Moderator
From: Melbourne, Australia
Registered: 2012-09-29
Posts: 4,399

Re: system does not error on bad /Gallery URL's after migration from test

To add to my previous reply, the steps for this:

Log into Backlight
Click on the Backlight then Settings menu
Scroll to the bottom of the page, and click on Show Advanced Settings
Click on Edit Settings
Edit the contents of the Album .htaccess field    (adding the # to those three lines at the bottom of the htaccess contents)
Click Save Settings
Click on the Backlight then Publisher menu
Click on Update Album Files
Click Update

Offline

#12 2016-06-13 15:20:07

tonesshots
Member
Registered: 2012-11-22
Posts: 43

Re: system does not error on bad /Gallery URL's after migration from test

Well done Ben. It worked. Not had a thorough final look at all functionality but the error 404 comes up now as expected. So grateful to all moderators and the writing team for the excellent tech support. The htaccess stuff looks a bit hairy and I am also glad I did not have to deal with solving that on my own. Your instructions are clear and easy to follow and implement, I have a hunch a few more similar cases will find a fix here. Will start populating the main albums later today.

Offline

#13 2016-06-13 17:27:57

tonesshots
Member
Registered: 2012-11-22
Posts: 43

Re: system does not error on bad /Gallery URL's after migration from test

Rod. I wondered if you would elaborate on the 'broken web fonts issue' you spotted on my site? Thanks Tony P

Offline

#14 2016-06-13 18:55:05

Ben
Moderator
From: Melbourne, Australia
Registered: 2012-09-29
Posts: 4,399

Re: system does not error on bad /Gallery URL's after migration from test

Hi Tony, I'm glad that worked.

The broken web fonts issue is related to /galleries/rubbish not returning a 404.  It gets a bit complicated but here's how the issue came typically about:

In short, a non-existent URL from the past (e.g. http://yoursite.com/galleries/travel/europe/) was crawled by a web bot.  Since travel/europe/ no longer existed, the request was handled by /galleries/ (instead of Backlight generating a 404 Not Found, which is what the update to htaccess you made fixes).  The discrepancy between the URL retrieved (http://yoursite.com/galleries/travel/europe) and that which responded to the request (http://yoursite.com/galleries/) caused paths to be calculated incorrectly.  In particular the path for fonts was coming out to be something like http://yoursite.com/galleries/travel/ba … wesome.css instead of the correct path of http://yoursite.com/backlight/modules/o … wesome.css

A tricky issue to diagnose, especially due to the template-generating gallery calls coming from bots, as they caused templates to be generated with broken paths before a real user had a chance to cause the template to be generated from a current link.

Offline

#15 2016-06-13 19:43:49

tonesshots
Member
Registered: 2012-11-22
Posts: 43

Re: system does not error on bad /Gallery URL's after migration from test

Again Ben that was very helpful in explaining the problem I had and in understanding the way these things work under the hood. Tricky to diagnose indeed but very rewarding when you have the answer.

Tony P

Offline

#16 2016-06-13 19:52:00

Ben
Moderator
From: Melbourne, Australia
Registered: 2012-09-29
Posts: 4,399

Re: system does not error on bad /Gallery URL's after migration from test

Hi Tony, it was quite a relief to find the cause.  Quite often the most difficult part in debugging is in reproducing the error.

Offline

Board footer

Powered by FluxBB