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 2015-11-08 02:32:24

theomolenaar
Member
Registered: 2012-12-11
Posts: 163

Autoindex problems

I try to go from CE3 to CE4 and use publisher to make more and smaller albums, with masonry layouts.

I have followed the manual and the albums look ok (have to do some tweaking later) as is most of the other stuff.

However I cannot get the autoindex to work.

With Ce3 I had the same problem as people who use Go Daddy (I use Strato one f the biggest hostinng companys in Europe. My site is in a subdomain. The old site was pictures.theomlenaar.nl where pictures is redirected to 'www.theomolenaar.nl/pictures_CE3_V01]. It works fine only I haveto make separte autoindex files for every level.

Now I am working on pictures_CE4_V01. So far  I  redirect from test.theomolenaar.nl, but I will change that when I go online. I am working with publisher to create album sets and everything seemed to work good as far as the upload is concerned. Asia has both an album (bhutan) as another set (China).

I edited the  autoindex-php the $root thing Matt mentioned when I  had a similar error in
CE3. $_root = @realpath($_SERVER["SUBDOMAIN_DOCUMENT_ROOT"]);

But now the hierarchie is lost. If you llook at this you can see that if you go down the link is to the galleries-route. Before that change is was to test.theomolenaar.nl/pictures_CE4_V01/galleries/  etc..

The index sees and reads the content of the album_sets or albums but the link is to another location.

http://test.theomolenaar.nl/galleries/a … he-mekong/

At the Galleries level you can see the original problem (is that another index).

Last edited by theomolenaar (2015-11-08 02:35:55)

Offline

#2 2015-11-08 03:07:54

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

Re: Autoindex problems

Just some observations. Sorry, I don't have a solution. Have to leave that to Matt and Ben:

yep, your the links to the album sets from the galleries page are trying to go through /_pictures_CE4_V01/
http://test.theomolenaar.nl/_pictures_C … ries/asia/
it's actually here: http://test.theomolenaar.nl/galleries/asia/

and if you get to, say, the Asia page, the links to the actual albums are trying to go to, for instance:
http://test.theomolenaar.nl/bhutan/
when that should be (and is) at http://test.theomolenaar.nl/galleries/asia/bhutan/

and you're getting the realpath() error: http://test.theomolenaar.nl/galleries/l … verify.php

So probably the redirect combined with the host's problems and the fact that you're now using Publisher (I don't know how/if it resolves redirects).


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 2015-11-08 05:56:21

theomolenaar
Member
Registered: 2012-12-11
Posts: 163

Re: Autoindex problems

Thanks for looking.

I did not see the realpath error. But then I changed the file. I ofcourse own the domainname. It is my main one. I have several other domainnames and they are handled exactlly as is the subdomain ! A reddirect to a directory under www.theomolenaar.nl. So it is common practice I gues. I doubt if the provider with 4 million domains ISO certified etc. will admit that they are doing anything wrong (even if they are). Unless I can ask something very specific I do nt think the solution comes from that side.

Publisher got all the albums and sets in the proper directories it seems. And the breadcrums are correct. But thenn again I filled them.

The index 'sees' the albums.  It seems that the thumbnails are also not found. They are both in the root and in the thumbnail directoy in the China album.

Offline

#4 2015-11-11 21:32:32

theomolenaar
Member
Registered: 2012-12-11
Posts: 163

Re: Autoindex problems

I uploaded again. So the changes I made in the file are undone. So instead of  http://test.theomolenaar.nl/galleries/asia/bhutan/ the links go to the redireted /_pictures_CE4_V01 again. I understand (i think) why it worked before and not now. I had a dedicatated auto index for each level. Now there is the autoindex in the templates directory. So there is only one.

As for the thumbnails. I have thumnail.jpg everywhere now, but no thumbnails appear. I have changed the thumbnail for Bhutan in publisher. I could locate it in the autoindex.xml and in the source of the genarated page:

<div class="album grid_4 clearfix">
    <div class="album-mantle clearfix">
        <a class="album-link" href="/_pictures_CE4_V01/galleries/asia/"></a>
        <div class="album-core clearfix">
       
        <div class="album-image mosaic-backdrop"
            style="background-image: url(/_pictures_CE4_V01/galleries/asia/bhutan/thumbnails/Thimphu---Clocktower.jpg);">
        </div>

        <div class="mosaic-overlay">
        <div class="album-info">
            <p class="album-title">Asia</p>
            <p class="album-description">Over the years I did the biggest part of my trips to Asia. Recently travel took me to India, China, Japan Tibet and Bhutan. Myanmar (1995) is still an alltime favorite.</p>
            <p class="album-overlay"></p>
        </div>
        </div>

        </div>
    </div>
</div><!-- .album -->

so the image is looked up in /_pictures_CE4_V01/galleries/asia/bhutan/thumbnails/Thimphu---Clocktower.jpg in stead of the link without the redirect.

Where this originates is for me impossible to find. The whole thing looks extremely complicated. There are scripts executing scrips executing scripts it seems. I found a lot of autoindex scrips over various directories.

I looked in the documentation but I could not find something like an architecture view. Which script executes which. With all the relative paths it is impossibe  for me to reverse engineer this.

I think that if the path both the thumbnail and the link could be changed that everything might work. Maybe the root could be identified withh a path like this: /home/strato/http/power/rid/90/89/51959089/htdocs/_pictures_CE4_V01/

But how and where I do not know....

Offline

#5 2015-11-11 22:47:02

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

Re: Autoindex problems

you still have the issue of the realtpath() error. This is a server issue (might be because of the redirects?). It would be easier to solve this issue rather than trying to reverse engineer the scripts.


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

Offline

#6 2015-11-12 01:41:36

theomolenaar
Member
Registered: 2012-12-11
Posts: 163

Re: Autoindex problems

But how do I solve it? Tell this company with 60.000 servers they are doing someting wrong ? I'll get the answer that the scripting does not work on subdomains probabely. But I will post someting anyhow. Only I do not epect any results.

I know it is because of the redirects. I had the same problem with the previous version. The point is that everything else works just fine. The autoindex can read the files with the header and text that are in the same location as the thumbnail is and that the link should be going to.

Offline

#7 2015-11-12 01:51:03

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

Re: Autoindex problems

have you tried contacting Matt about this yet?

Were you using Publisher when you had it working before?


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

Offline

#8 2015-11-12 03:20:32

theomolenaar
Member
Registered: 2012-12-11
Posts: 163

Re: Autoindex problems

No I was not using publisher. But publisher is not the problem I think.

I uploaded an album directly without using publisher:

http://test.theomolenaar.nl/galleries/

I had to make specific autoindex occurences before.  Bottom of this topic:

http://community.theturninggate.net/post/2020/#p2020

I have posted the problem with the hosting company.

Offline

#9 2015-11-12 03:40:34

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

Re: Autoindex problems

I uploaded an album directly without using publisher:

this link: http://test.theomolenaar.nl/galleries/
goes to an index page that has an album and an album index. Clicking on them brings up the 404. But if you take the _pictures_CE4_V01 out of the path you can get to the album, which is created with Publisher.

I'm wondering if, since you had this working before using Publisher, if the problem lies in how Publisher uses the autoindex script.

Either way, Matt or Ben would be the ones to know.


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

Offline

#10 2015-11-12 03:53:47

theomolenaar
Member
Registered: 2012-12-11
Posts: 163

Re: Autoindex problems

It is the same problem with the album I exported and then uploaded as a with the directories (and albums)) I uploaded using publisher.

Before (old site) I did not use publisher because I made separate mastheads per album... And I made separate autoindex files per directory with the path hardcoded. All things I do not want to do again, because then I'd better use a good blog theme instead of TTG. With your help I got the title in the header, so now this is the obstacle left...

Offline

#11 2015-11-12 04:02:39

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

Re: Autoindex problems

All I can suggest is contacting Matt


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

Offline

#12 2015-11-12 14:06:21

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

Re: Autoindex problems

As before, your server fails our verification test on realpath:
http://test.theomolenaar.nl/galleries/l … verify.php

This is a hosting issue that you will need to resolve with your host, else find a host that does things in the correct way.


Matt

The Turning Gate, http://theturninggate.net

Offline

#13 2015-11-12 19:39:39

theomolenaar
Member
Registered: 2012-12-11
Posts: 163

Re: Autoindex problems

So you are saying that one of the largest hosting companies in the world is doing things wrong ? I' have mailed them that you (the script) said so. Awaiting response.

Offline

#14 2015-11-12 22:37:17

theomolenaar
Member
Registered: 2012-12-11
Posts: 163

Re: Autoindex problems

In the meantime I have without any knowledge of PHP but just by looking at the scripts solved one of the problems....

In the 'old' script I saw that the string $urlpath was replaced in all autoindex files. I looked up where that string was now and it was in the autoindex.php in the lib directory of the template under ttg-be/templates/autoindex.

I also found a statement called ireplace, that looked like it was replacing something, looked that up and indeed it was a statement of that kind. So I added a replace: 

            $_root = @realpath($_SERVER['DOCUMENT_ROOT']);
            $_rootlen = strlen($_root);

            $_fp = str_ireplace('/_pictures_CE4_V01/', '/', $_fp);

            $_urlpath = substr($_fp, $_rootlen);

And behold it worked. The galleries page has its own index I guess, i'll do that later.

http://test.theomolenaar.nl/galleries/asia/china/

The images however seem random. Still have to figure out where they come from. 'hardcoded' thumbnail.jpg in the root of the album would be nice...

Offline

#15 2015-11-13 00:04:17

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

Re: Autoindex problems

The images however seem random.

this is the default behavior
http://ce4.theturninggate.net/docs/doku … _publisher


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

Offline

#16 2015-11-13 01:19:16

theomolenaar
Member
Registered: 2012-12-11
Posts: 163

Re: Autoindex problems

Aha. But some remain the same as I reload. I filled in the template.I wanted the scipts to use the thumbnail.jpg in the root. But I see now that some albums have a different behaviour. Confusing if you put the Antigua thumbnail in the china/thumbnails folder :-)

So I have to look at my publisher settings I guess.

Thanks

Offline

#17 2015-11-13 02:01:46

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

Re: Autoindex problems

it doesn't matter what you put in the Album Info fields for Publisher templates. All of that information is entered when you create an album.


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

Offline

#18 2015-11-13 16:11:59

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

Re: Autoindex problems

theomolenaar wrote:

So you are saying that one of the largest hosting companies in the world is doing things wrong ? I' have mailed them that you (the script) said so. Awaiting response.

Yep. They're crap.

Here are some definitions of realpath().

http://php.net/manual/en/function.realpath.php :
realpath() expands all symbolic links and resolves references to '/./', '/../' and extra '/' characters in the input path and returns the canonicalized absolute pathname.

http://www.w3schools.com/php/func_files … alpath.asp :
The realpath() function returns the absolute pathname.

So if one of largest hosting companies in the world can't get realpath() to do what it ought to do, in accordance with PHP standards and documentation, then they're also one of the crappiest hosting companies in the world. If they reply with anything other than, "Yes, sorry. We're shit," then they're lying to you. And if they were my host, that would be a short-lived arrangement.


Matt

The Turning Gate, http://theturninggate.net

Offline

#19 2015-11-13 18:24:45

theomolenaar
Member
Registered: 2012-12-11
Posts: 163

Re: Autoindex problems

@Rod

After some trial and error I got it. In the autoindex documentation it is mentioned that you fill in thumbnail.jpg in the autoindex and the thumbnail in the root. However I did not get that working. By choosing for Custom in the album and putting the thumbnail in the custom-thumbnaill directory I got everything working as I wanted.

Last edited by theomolenaar (2015-11-13 21:53:24)

Offline

#20 2015-11-13 23:00:08

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

Re: Autoindex problems

In the autoindex documentation it is mentioned that you fill in thumbnail.jpg in the autoindex and the thumbnail in the root. However I did not get that working.

Right, that works with uploaded autoindexes and galleries, not Publisher albums.


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

Offline

Board footer

Powered by FluxBB