Search…

X3 Photo Gallery Support Forums

Search…
 
TobseEgg
Topic Author
Posts: 5
Joined: 12 May 2012, 06:35

"_" in folder names

02 Dec 2014, 10:11

Hello,

since I updated to Beta V0.5 I get an Error 404 when opening a folder with "_" in the directory name like

/te_st/

(After downgrading to 0.3 or 0.4 (I'm not exactly shure which version the backup was...) everything is working again)
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13993
Joined: 30 Sep 2006, 03:37

Re: "_" in folder names

02 Dec 2014, 23:42

Works fine here, and I can't recall anything we added that reacts upon the _underscore character. I will need to see a link to diagnose this ...
Image
 
TobseEgg
Topic Author
Posts: 5
Joined: 12 May 2012, 06:35

Re: "_" in folder names

04 Dec 2014, 08:56

Hello,
here's a link:
http://tobiaseggensberger.de/galerien/v ... Gustavsen/

I attached an Image of the two Beta versions.

Alternatively here is a complete fresh installation: http://test1.tobiaseggensberger.de/x3/b0_5/
And the same Pages copied to a new 0.3-installation: http://test1.tobiaseggensberger.de/x3/b0_3/

Thank you,
Tobias
Attachments
b5.PNG
b5.PNG (164.72 KiB) Viewed 6442 times
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13993
Joined: 30 Sep 2006, 03:37

Re: "_" in folder names

04 Dec 2014, 10:23

I find it strange that it works here, but not at your place. It could be there was something in last release which was not done properly, and then fixed after ... I will have a new version ready tomorrow, and we can check then ... If the update doesn't fix anything, I will probably want to look at the .htaccess file ...
 
margouillat
Experienced
Posts: 34
Joined: 31 Jul 2011, 09:20

Re: "_" in folder names

04 Dec 2014, 12:42

I noticed the same problem with the name of the pictures if the name starts with "_" (_DSC3629.jpg).
the picture appears when I remove, it work.
Margouillat
loeildumargouillat.fr
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13993
Joined: 30 Sep 2006, 03:37

Re: "_" in folder names

04 Dec 2014, 13:06

margouillat wrote:I noticed the same problem with the name of the pictures if the name starts with "_" (_DSC3629.jpg).
the picture appears when I remove, it work.
This is a specific rule to hide all files and folders that start with _underscore. It has many uses, for example creating inaccessible/unpublished folders or adding images that are hidden from a page's gallery but still available to load.
 
TobseEgg
Topic Author
Posts: 5
Joined: 12 May 2012, 06:35

Re: "_" in folder names

06 Dec 2014, 13:31

I installed b0.6 but the behaviour didn't change.


In 'app/stacey.inc.php' there is a preg_replace (Line 157) which replaces the underscore character ('/[\.|\_][\w\d]+?$/').
When I remove the _ character from the parameters so that it's the same code as it was in 0.3 (only '/[\.][\w\d]+?$/' remain) everything works fine (At least when I type in the URL. Internal links don't work).
(I dont know if that's the right approach, just had some time to play :wink: )
Attachments
b0_.6modded.png
b0_.6modded.png (12.39 KiB) Viewed 6418 times
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13993
Joined: 30 Sep 2006, 03:37

Re: "_" in folder names

07 Dec 2014, 01:03

Yes, I thought it might be related to this, and I'm impressed you manage to debug this yourself. It has to be said though, the fix added there is because we need to "rewrite" calls to load the ajax JSON file for servers with the rewrite option disabled (thus your fix is acceptable in your case).

Ultimately, this issue stems from a problem in your folder name "1210_TordGustavsen". The number in front of . or _ basically represents the numbering order of the folder, and thus leaves "_TordGustavsen", which with an underscore in front, effectively means a "hidden" folder. I believe it would work find if your folder was named "F1210_TordGustavsen" (eg. with a non-numeral character first, or "1210-TordGustavsen" (eg without the _underscore char).

I will look into this ...
 
User avatar
Bulletproof IT
Experienced
Posts: 134
Joined: 04 May 2013, 04:36

Re: "_" in folder names

10 Dec 2014, 09:34

Why not just use: "TordGustavsen.1210" or instead of "." try and use a "_" or "-" or ","
Have you tried these separators instead of _?
» I Imagevue X3 «
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13993
Joined: 30 Sep 2006, 03:37

Re: "_" in folder names

10 Feb 2015, 10:28

The folder name _underscore issue has now been fixed, and is pending release in v0.9.

Having said that, I would strongly recommend against using _ underscores in physical folder names in the first place. Folder names are what is displayed in the URL of the page, and should be as simple and pretty as possible. If you cannot restrict it to a single word, then use hyphens -

"Mount Everest"
domain.com/everest/ [BEST]
domain.com/mount-everest/ [STANDARDS]
domain.com/mount_everest/ [NO THNX]