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.
You are not logged in.
Hi Daniel,
When I moved to my current host Ben had to do something for me as the host provided some important error trapping stuff that he found very useful. I would not know where to start with this stuff.
.htaccess contains this code;
<IfModule mod_headers.c>
<FilesMatch "\.(eot|font.css|otf|ttc|ttf|woff)$">
Header set Access-Control-Allow-Origin "*"
</FilesMatch>
</IfModule>
<IfModule mod_rewrite.c>
RewriteEngine On
#RewriteCond %{REQUEST_URI}::$1 ^(.*?/)(.*)::\2$
#RewriteRule ^(.*)$ - [E=BASE:%1]
##RewriteRule ^(.*)$ - [E=BASE:]
RewriteBase /
RewriteCond $0#%{REQUEST_URI} ([^#]*)#(.*)\1$
RewriteRule ^.*$ - [E=BASE:%2]
RewriteRule ^(.*)$ - [E=QS:mod_rewrite=on]
RewriteRule ^([^\/.]*)-single.php$ %{ENV:BASE}single.php?%{ENV:QS}&id=$1 [QSA,L]
RewriteRule ^([^\/.]*).css$ %{ENV:BASE}index.php?%{ENV:QS}&extension=css&name=$1 [QSA,L]
RewriteRule ^([^\/.]*).js$ %{ENV:BASE}index.php?%{ENV:QS}&extension=js&name=$1 [QSA,L]
RewriteRule ^([^\/.]*).gif$ %{ENV:BASE}index.php?%{ENV:QS}&extension=gif&name=$1 [QSA,L]
RewriteRule ^([^\/.]*).png$ %{ENV:BASE}index.php?%{ENV:QS}&extension=png&name=$1 [QSA,L]
RewriteRule ^([^\/.]*).jpg$ %{ENV:BASE}index.php?%{ENV:QS}&extension=jpg&name=$1 [QSA,L]
#RewriteCond %{QUERY_STRING} !mod_rewrite=on
#RewriteRule ^index.php$ %{ENV:BASE}index.php?%{ENV:QS} [QSA,L]
RewriteCond %{QUERY_STRING} !mod_rewrite=on
RewriteRule ^mobile.php$ %{ENV:BASE}mobile.php?%{ENV:QS} [QSA,L]
RewriteCond %{QUERY_STRING} !mod_rewrite=on
RewriteRule ^(.*)download.php %{ENV:BASE}download.php?%{ENV:QS} [QSA,L]
#RewriteRule ^/?$ index.php [QSA,L]
RewriteRule ^$ %{ENV:BASE}index.php?%{ENV:QS} [QSA,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ %{ENV:BASE}index.php?%{ENV:QS}&page=$1 [QSA,L]
</IfModule>
# php -- BEGIN cPanel-generated handler, do not edit
# Set the “alt-php70” package as the default “PHP” programming language.
<IfModule mime_module>
AddHandler application/x-httpd-alt-php70___lsphp .php .php7 .phtml
</IfModule>
# php -- END cPanel-generated handler, do not edit
Regards,
TomO
Just a simple photographer
Live site at http://tomowens.openpoint.co.uk/
Offline
Something for Ben and Matt to look at.
Daniel Leu | Photography
DanielLeu.com
My digital playground (eg, Backlight tips&tricks): lab.DanielLeu.com
Offline
Thanks Daniel,
At least the images went well with your lab colour scheme!
Regards,
TomO
Just a simple photographer
Live site at http://tomowens.openpoint.co.uk/
Offline
If I'm going to debug, I'll need access to the Backlight and Wordpress admin areas, and maybe FTP access (so that I can look at the files created by the WP theme). You can email me.
Offline
Thanks Daniel,
At least the images went well with your lab colour scheme!
What a nice coincidence! How many of us are now turning towards photographing flowers...
Daniel Leu | Photography
DanielLeu.com
My digital playground (eg, Backlight tips&tricks): lab.DanielLeu.com
Offline
also worth checking, are you able to use the regular [gallery] Wordpress shortcode, or does it fail as well?
Offline
Hi Matt,
I just tried the regular [gallery] WP shortcode - a first time I think- and it worked https://tomowens.openpoint.co.uk/blog/2 … t-gallery/
Regards,
TomO
Just a simple photographer
Live site at http://tomowens.openpoint.co.uk/
Offline
Hi Matt,
I sent a new email today for cPanel access if you need it. Let me know if you need any more information.
Thanks
Regards,
TomO
Just a simple photographer
Live site at http://tomowens.openpoint.co.uk/
Offline
I checked that the API call works: https://tomowens.openpoint.co.uk/backli … lbum/55496
so that can be ruled out. One possibility is that the server or browser is unable to fetch from that URL.
Offline
Would that be an .htaccess thing? Yesterday, I fixed page 404 issues when clicking on images in blog posts but that was a permalinks resetting which this won't be as all those images were in the WP media store.
There was some security thing that you worked around for me when I first moved to this host Easter 2018. Will you need me to send you the cPanel credentials again?
Thanks
Regards,
TomO
Just a simple photographer
Live site at http://tomowens.openpoint.co.uk/
Offline
I tried a different browser but same issue.
Regards,
TomO
Just a simple photographer
Live site at http://tomowens.openpoint.co.uk/
Offline
Hi Ben,
Looking at the output in your API test I am wondering why the breadcrumb field is empty at album level when breadcrumbs are turned on for the album as published, yet breadcrumb for children level shows as turned on.
I presume that the permalink field relates to a gallery that might exist in the Media store within WP or am I wrong in the presumption?
Regards,
TomO
Just a simple photographer
Live site at http://tomowens.openpoint.co.uk/
Offline
Hi Ben,
I've been rooting through help FAQs on my host and I am wondering if the https is causing this problem.
They suggest that this be added to .htaccess;
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301,NE]
If I were to add this to the .htaccess file, is there a particular hierarchy as regards where that statement should go and is this a possible cause for the api not pulling through from Backlight to WP?
As you know I'm not a coder but I'mm looking for possible environmental variables in a root cause way to this problem.
Thanks
Regards,
TomO
Just a simple photographer
Live site at http://tomowens.openpoint.co.uk/
Offline
Tom, have you enabled the https browser redirect feature in Backlight Settings?
Rod
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site
Offline
Hi Rod,
That was turned off but I've set that to 'Yes', saved the settings, cleared the cache but no change to the test post.
I was wondering if my WordPress settings were an issue.
Ought I to be using the Gutenberg Block editor (which I loathe) - I am on Classic Editor and I used the Text not Visual to enter the code.
Ought I to have a JSON Plugin in WP?
Regards,
TomO
Just a simple photographer
Live site at http://tomowens.openpoint.co.uk/
Offline
I too loathe the Gutenberg block editor. I'm using the Classic editor too.
You shouldn't need a special JSON plugin for WordPress.
seems like you're doing everything right.
Rod
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site
Offline
Thanks Rod.
I'll wait for Ben or Matt to come back to me.
Regards,
TomO
Just a simple photographer
Live site at http://tomowens.openpoint.co.uk/
Offline
Update,
I deleted the published album including the images on-line and re-published to see if publisher 5.0.2 made a difference, it did not. The JSON API https://tomowens.openpoint.co.uk/backli … bum/125632 returns data but result is WP is still the same.
Regards,
TomO
Just a simple photographer
Live site at http://tomowens.openpoint.co.uk/
Offline
In an effort to assess if everything is up to date for my WP installation I ran aSite Health Status report in WP and the following was listed about the REST API -
The server cannot find the requested page tomowens.openpoint.co.uk/blog/wp-json/wp/v2/types/post?context=edit (port 443)
That sub-directory 'wp-json' does not exist in my installation. Is this a possible cause of the issue I have?
Regards,
TomO
Just a simple photographer
Live site at http://tomowens.openpoint.co.uk/
Offline
In an effort to assess if everything is up to date for my WP installation I ran aSite Health Status report in WP and the following was listed about the REST API -
The server cannot find the requested page tomowens.openpoint.co.uk/blog/wp-json/wp/v2/types/post?context=edit (port 443)
That sub-directory 'wp-json' does not exist in my installation. Is this a possible cause of the issue I have?
'wp-json' is a virtual directory like '/backlight/api'. Therefore it is normal that you don't see it. I think you get the error because the URL doesn't contain a post ID.
The Wordpress REST API is the JSON interface for Wordpress. This is not related to the Backlight JSON API which provides a JSON interface for Backlight.
I think the issue is that either .htaccess or your host is blocking access to the Backlight JSON API. Do you have any type of firewalls active? I would look at the cpanel of your host.
Daniel Leu | Photography
DanielLeu.com
My digital playground (eg, Backlight tips&tricks): lab.DanielLeu.com
Offline
Thanks Daniel,
I would not have known it was a virtual directory or that REST API is JSON
Mod Security is enabled on all domains in my cPanel. I have tried disabling it for this domian and testing the test post in WP but that does not make a difference so I have turned Mod Security back on.
Last edited by tomowensphoto (2020-05-18 01:23:39)
Regards,
TomO
Just a simple photographer
Live site at http://tomowens.openpoint.co.uk/
Offline
I suppose that leaves us with the .htaccess or the host blocking the Backlight JSON API. I will need to know what technical phrase to put in my helpdesk ticket but I appreciate the fact that the detail might not be pertinent to a public forum so emailing me might be better.
I also tried upgrading PHP to 7.3 on the host through cPanel and gave me a 404 error for the entire blog. 7.2 works OK but does not resolve the JSON issue.
Regards,
TomO
Just a simple photographer
Live site at http://tomowens.openpoint.co.uk/
Offline
Hi Tom,
Sorry, I haven't checked in in a few days, and have been off of my computer most of the weekend. I haven't received your emails. Can you send relevant info to mjcampagna at gmail?
Offline
Oooooookaaaaaaay ... I found your messages in my spam folder, Tom. Along with other messages I have apparently missed. And a bunch of crap about my @theturninggate mailboxes having been hacked. So that's just great.
I will try to look at this within the next few days, but I apparently have some catching up and some damage control that I need to do. =/
Offline
Hi Matt,
Daniel sent me some scripts to run last night and a model text to send to my host asking them to investigate REST API Error 404. I raised the ticket last night for them to see when their helpdesk people start at 0830 BST.
I'll update here when I get a response.
Regards,
TomO
Just a simple photographer
Live site at http://tomowens.openpoint.co.uk/
Offline