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 2014-11-13 23:58:15

derk
Member
Registered: 2014-11-13
Posts: 13

Problem wiht ce4 publisher in offline testing environment

Hi!
I am testing ce4 plugins within a local MAMP environment on my Macbook.
So the root/url of my testsite as shown in the Browser is 'localhost:8888' (this is the htdocs' folder within local MAMP environment).
When i publish a gallery with ce4-publisher  (Version 2.13) , it creates that gallery but  neither the thumbnails nor the images show up.
Thats because somehow ce4-publisher 'attributes' wrong filepathes to them -
When i hover over a 'broken' image thumbnail the browser shows as its path eg:

    ' http://localhost/theater/testgallery/photos/myImage.jpg '

But the proper path should be as follows:
    ' http://localhost:8888/theater/testgallery/photos/myImage.jpg '

Trying to figure it out it shows that:
1.  When i just export the 'testgallery' form LR to the desktop and throw its folder into the 'theater'-autoInex-Folder (http://localhost:8888/theater/    which is the folder  '/htdocs/theater/' ) it works perfectly !?
2.  Publishing with ce3-publisher works also without any problems (- thumbs and images show up having the proper filepaths)

So this must be a problem with with ce4-publisher.
(I tried to reinstall ce4-publisher plugin and the 'publisher' folder into the 'ttg-be' folder located in root of site (htdocs/).
Have i missed something or is this a bug?
Thanks for advice !

Offline

#2 2014-11-14 00:57:52

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

Re: Problem wiht ce4 publisher in offline testing environment

could be a problem with the MAMP installation. Not necessarily a "problem" but an issue where some feature or another isn't enabled.

I was having a similar issue with a WAMP installation (don't remember exactly what it was at the moment) and Ben was able to point me in the right direction.

I'm thinking it had something to do with php extensions. So take a look at this topic and then check that against what you have enabled in your MAMP set up. Look for PDO and sqlite in your php extensions set up.

If that's not it, then just wait for Ben to pop in.


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 2014-11-14 05:14:18

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

Re: Problem wiht ce4 publisher in offline testing environment

Perhaps a bug with Publisher's URL util, which isn't taking consideration of port numbers.
I'll look into this. In the mean time, can you set MAMP to use port 80 instead?

MAMP is the environment I use to develop Publisher. I've long had it configured to run on port 80.

Offline

#4 2014-11-14 08:46:53

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

Re: Problem wiht ce4 publisher in offline testing environment

The resolvedPath() function in ttg-be/framework/helpers/URLHelper.php does not take the port into consideration. 
I've added a fix in my working copy, however this likely won't be released for quite a while (we try to avoid updating the TTG BE framework unless absolutely necessary).  In the mean time, you can get this working by editing ttg-be/framework/helpers/URLHelper.php and adding this line:

$resolvedURL .= $parsedURL['port'] ? ':'.$parsedURL['port'] : '';

immediately below this line (on line 225):

$resolvedURL = $parsedURL['scheme'] ? $parsedURL['scheme'].'://'.$parsedURL['host'] : '';

so that it reads like this:

$resolvedURL = $parsedURL['scheme'] ? $parsedURL['scheme'].'://'.$parsedURL['host'] : '';
$resolvedURL .= $parsedURL['port'] ? ':'.$parsedURL['port'] : '';

Offline

#5 2014-11-14 11:12:57

derk
Member
Registered: 2014-11-13
Posts: 13

Re: Problem wiht ce4 publisher in offline testing environment

Hi Rob and Ben !

Ben, editing the URLHelper.php as you said solves the issue.
Thanks for your prompt advise, effort and help !
Best, Derk (from north of Germany).

Offline

Board footer

Powered by FluxBB