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-07-13 11:57:10

markh
Member
From: Center of The US
Registered: 2012-09-24
Posts: 380
Website

Cart on this site has buttons that do nothing

Addition of cart to a test site went perfectly as per my previous post. However, adding cart to another site site seemed to go as well except that the cart buttons on thumbnails and large images don't do anything. On the home page, however the cart buttons work as expected. Only the galleries malfunction. Templates all have cart enabled. Publisher has been updated and all the galleries and albums have been republished after enabling the cart in lightroom publisher. Template cache and browser cache have been cleared. Granted, I've been at this now pretty much all day and it's quite possible my brain has turned to tapioca and I'm missing the obvious.
Site is here: http://markhoffmanphotography.com
Ideas?

Offline

#2 2016-07-13 12:14:56

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

Re: Cart on this site has buttons that do nothing

Hi, I'm able to use the cart on your site without issue. Have you changed anything since posting?
It may be worth clearing the browser cache.

Offline

#3 2016-07-13 14:51:15

Matthew
Administrator
From: San Francisco, CA
Registered: 2012-09-24
Posts: 5,795
Website

Re: Cart on this site has buttons that do nothing

Your home page seems to be working just fine. Clicking through to your Canyonlands portfolio, though, I'm finding problems as you describe. In the console log, I'm seeing this error:

XMLHttpRequest cannot load http://markhoffmanphotography.com/backl … 8388806002. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://www.markhoffmanphotography.com' is therefore not allowed access.

Ben can likely tell you more about it than I can, but it seems to be a cross-domain origin issue. Note the "www" in one address, and not the other. And sure enough, when I load your page using an address without "www", it works just fine.

Works:
http://markhoffmanphotography.com/gallery2/canyonlands/

Doesn't work:
http://www.markhoffmanphotography.com/g … nyonlands/

This might be something you can resolve via .htaccess, or you might be better off dealing with your host at server level. Ben, what do you think?


Matt

The Turning Gate, http://theturninggate.net

Offline

#4 2016-07-13 20:19:39

markh
Member
From: Center of The US
Registered: 2012-09-24
Posts: 380
Website

Re: Cart on this site has buttons that do nothing

Thanks Matt. Prior to upgrading to 103 and cart400 I edited .htaccess on the site to try to get rid of cross-domain issues by adding the following code to it:
<IfModule mod_headers.c>
    <FilesMatch "\.(eot|font.css|otf|ttc|ttf|woff)$">
        Header set Access-Control-Allow-Origin "*"
    </FilesMatch>
</IfModule>

<IfModule mod_mime.c>

  # Web fonts
    AddType application/font-woff woff
    AddType application/vnd.ms-fontobject eot

    # Browsers usually ignore the font MIME types and sniff the content,
    # however, Chrome shows a warning if other MIME types are used for the
    # following fonts.
    AddType application/x-font-ttf ttc ttf
    AddType font/opentype otf

    # Make SVGZ fonts work on iPad:
    # https://twitter.com/FontSquirrel/status/14855840545
    AddType        image/svg+xml svg svgz
    AddEncoding gzip svgz

</IfModule>

# rewrite www.example.com → example.com

<IfModule mod_rewrite.c>
    RewriteCond %{HTTPS} !=on
    RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
    RewriteRule ^ http://%1%{REQUEST_URI} [R=301,L]
</IfModule>

After that I had to redirect all my publisher instances to the site without the www. Would that have a bearing on this issue?

Offline

#5 2016-07-13 20:37:45

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

Re: Cart on this site has buttons that do nothing

Hi Mark, I'm not sure what's going on.  When I visit http://www.markhoffmanphotography.com/ the browser inspector for some reason tells me it's loading http://www.markhoffmanphotography.com/g … nyonlands/

Whatever the reason for that may be, it may be that your site is using the .htaccess file as found within http://www.markhoffmanphotography.com/g … nyonlands/.  That probably won't include your cross-domain directive.  Can you try updating the htaccess setting used for galleries, following these steps:

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 *** See below ***
Click Save Settings
Click on the Backlight then Publisher menu
Click on Update Album Files
Click Update

When you edit that variable, you'll want to make sure this code is either added or uncommented (if it's sitting at the end of the textarea with '#' at the beginning of each line):

<IfModule mod_headers.c>
    <FilesMatch ".*">
        Header set Access-Control-Allow-Origin "*"
    </FilesMatch>
</IfModule>

Can you give that a go and let us know when you've made the update?  See also that I changed the value of FilesMatch to be as broad as possible.  It may be worth trying that value in your top-level .htaccess as well.

Offline

#6 2016-07-13 21:13:10

markh
Member
From: Center of The US
Registered: 2012-09-24
Posts: 380
Website

Re: Cart on this site has buttons that do nothing

Hi Ben. Did all of the above to no avail. Then happened to notice that the site url on the home page had no www yet the urls to all the galleries did have the www. Hmmm, I said to myself (since no one else at home will listen to me). So in BL settings I changed the site url and the company url to remove the www. Now everything seems to be working. To be honest this whole business of cross-domain clashes is quite confusing. I'm wondering if by changing the url to No www will I mangle things like google analytics that seem to be tracking my site based on the www designation.
Insight most appreciated.
Mark

Offline

#7 2016-07-14 01:41:27

Rainer Goergen
Member
From: Trier, Germany
Registered: 2016-05-01
Posts: 401
Website

Re: Cart on this site has buttons that do nothing

Have a look in Lightroom Publisher plugin settings. I for myself did do a mistake a week ago. I changed the website url from my NAS to my website and I have forgotten to write the www. in front the url. Then I have uploaded some pictures I have changed. I have had only trouble and confusion. When I discovered my mistake, I have deleted the new gallery folders on the server, changed the url right to www. and uploaded the galleries once more. Bingo.

Rainer

Offline

Board footer

Powered by FluxBB