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-08-23 06:28:12

photo-active
Member
Registered: 2014-08-22
Posts: 4

Publisher creates no Single PHP-files

Hi there,

publishing an album with Publisher does not create single-files, so the permalinks lead to an error 404.

Creating the same album directly with Lightromm via the web-modul, everything is okay...

What am I doing wrong?

You can have a look at: www.photo-active.biz !

Greetings

Jan

Offline

#2 2014-08-23 08:35:37

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

Re: Publisher creates no Single PHP-files

Hi Jan,  the single pages require that your server have modrewrite enabled.  This allows links to be mapped to other links.  For example, the permalink of:

http://www.photo-active.biz/galleries/architektur/Arch-1-single.php

should show the page that you can view at

http://www.photo-active.biz/galleries/architektur/single.php?id=Arch-1

I suggest that you contact your host's technical support and ask them to enable modrewrite for you.

Offline

#3 2014-08-25 17:43:43

photo-active
Member
Registered: 2014-08-22
Posts: 4

Re: Publisher creates no Single PHP-files

Hi Ben,

thanks for the quick answere.

The provider domainFactory explained, that mod_rewrite is enabled, on every server they have...

I updated the complete installation... but still no Single-Files...

Now I have to galleries online, the one named ACC is published with Lightroom, the second (guest / guest) named ACC2 is created via the web-galleries with Lightroom und uploaded via FTP.

In the second gallery, Lightroom created those Single-Files... http://photo-active.biz/ACC_Screenshot.jpg

I don't understand it...

Greetings

Jan

Offline

#4 2014-08-25 19:50:58

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

Re: Publisher creates no Single PHP-files

Hi Jan,  that's odd.  Can you check that there is an .htaccess file located at http://www.photo-active.biz/galleries/ACC/.htaccess ?
It won't be visible on the web - only through FTP.  Since the file starts with a period, you may need to change the settings in your FTP program to display hidden files.

The contents of the file should be:

<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteRule ^(.*)-single.*php$ single.php?id=$1 [L]
</IfModule>

Offline

#5 2014-08-25 20:27:28

photo-active
Member
Registered: 2014-08-22
Posts: 4

Re: Publisher creates no Single PHP-files

Hi Ben,

the htaccess-file with the exact code you have posted is in the ACC folder... it had the permisson 640, but even after changing it to 740, nothing changed... :-(

Greetings

Jan

Offline

#6 2014-08-25 20:45:56

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

Re: Publisher creates no Single PHP-files

Hi Jan,

This may be a little tricky to solve.  Can you try editing the .htaccess in order to determine whether the .htaccess file is being processed, and that mod rewrite is in fact on.

If you change it to this:

deny from all
<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteRule ^(.*)-single.*php$ single.php?id=$1 [L]
</IfModule>

Then your entire gallery should come up as Forbidden.  If it does, that proves that the .htaccess file is being read.

Assuming that worked as intended, changing it to this:

<IfModule mod_rewrite.c>
    deny from all
    RewriteEngine On
    RewriteRule ^(.*)-single.*php$ single.php?id=$1 [L]
</IfModule>

should also result in Forbidden for the gallery.  If this is the case then it proves that mod rewrite is on.  If not, then it proves that mod rewrite is off, at least for that gallery.

Please try those and let us know the results.  Don't forget to change it back to the original, so that your gallery will function:

<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteRule ^(.*)-single.*php$ single.php?id=$1 [L]
</IfModule>

Last edited by Ben (2014-08-25 20:46:14)

Offline

#7 2014-08-25 22:12:45

photo-active
Member
Registered: 2014-08-22
Posts: 4

Re: Publisher creates no Single PHP-files

That has been quick!!!

Thanks for the support!

I changed the .htaccess and both versions produced the 403 error...


Greetings

Jan

Offline

#8 2014-08-26 07:34:16

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

Re: Publisher creates no Single PHP-files

Hi Jan,

Thanks for trying that out.  I had hoped that the second test did not produce a 403.  Since it does, it means that the redirection code isn't working for some reason.  Could you setup FTP access for me and provide the details via message or Email (link below my picture)?  That will let me figure out what's going wrong.

Ben

Offline

#9 2014-09-01 16:47:48

stig
Member
Registered: 2014-02-17
Posts: 43

Re: Publisher creates no Single PHP-files

Are there any solution to this? I have the same problem. If I generate an album in the web-module, everything works. If I use publish-mechanism, I get no error messages, but the index.php and eny new single files are not created, thus any new pictures will not show up in the published gallery. I tried the same tests as you set up previous in this thread.

Stig

Offline

#10 2014-09-01 17:58:33

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

Re: Publisher creates no Single PHP-files

Hi Stig,  a fix was found, which hasn't yet been pushed out in a maintenance release - pending further testing.

Please try the following:

1. Edit ttg-be/publisher/application/skeleton/gallery/htaccess so that it contains this text

<IfModule mod_rewrite.c>
    RewriteEngine On

    RewriteCond %{REQUEST_URI}::$1 ^(.*?/)(.*)::\2$
    RewriteRule ^(.*)$ - [E=BASE:%1]
    RewriteRule ^(.*)-single.*php$ %{ENV:BASE}/single.php?id=$1 [L]
</IfModule>

2. Login to Publisher admin
3. Click 'Update Album Files' on the Dashboard

That last item re-copies the common files to every gallery, including the htaccess file edited above, which is copied as .htaccess, a hidden file. 

If you can try that and report whether that solves the issue for you that would be great.

PS, the underlying cause of the issue seems to be that some hosts set the paths to the current directory differently, causing the shipped .htaccess to be unable to find single.php.

Last edited by Ben (2014-09-01 18:00:45)

Offline

#11 2014-09-01 19:30:45

stig
Member
Registered: 2014-02-17
Posts: 43

Re: Publisher creates no Single PHP-files

In my case it was not only the single files that were not created, it was alos the case for updates in files like index.php. Before I read your answer I opened ttge/admin and selected the button "update album files", without doing anything else. I was than able to publish using the publish-mechanism again. An odd thing happened though: Just below the menu, before the text describing the gallery, a line appeared showing a navigation possibility for each folder below top folder. This also goes for the autoindex.

It seems that exporting using the gallery from the web-module creates the results I want and expect, but it destroys some file/setup needed for the publisher to work.

By the way, there is no difference in displaying the large pictures if I select highslide or magnific popup. Is this correct behaviour?

Stig

Offline

#12 2014-09-01 19:54:05

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

Re: Publisher creates no Single PHP-files

Hi Stig, that sounds strange.  Have you been trying to publish to Web-module-exported galleries?  If so, then that won't work. 
Can you provide a link to a gallery where I can see the line that appears?

The Highslide and Magnific popups do differ though they may look similar with the default settings.

Offline

#13 2014-09-01 20:46:37

stig
Member
Registered: 2014-02-17
Posts: 43

Re: Publisher creates no Single PHP-files

brathaug.no/stig/mine-web-sider/naturens-farger

stig

Offline

#14 2014-09-02 00:01:49

stig
Member
Registered: 2014-02-17
Posts: 43

Re: Publisher creates no Single PHP-files

He he, I found out the mysterious folder-info was breadcrumbs enabled some strange way.

It seems my troubles are gone. Thank you for your time.

Stig

Offline

Board footer

Powered by FluxBB