Posts:
4,093
Registered:
4-Aug-2006
|
|
|
Re: Variants with iOS 15.4 not working.
Posted:
4 Apr 22, 00:57
in response to: AndreWolff
|
|
|
Two pieces of code that I often forget I should use. Of course, routine testing doesn't reveal that it's a problem, because most of us never change the values. I always have to go hunting for them. engine.getIndexPageName()
engine.getPageExtension()
If you use these instead of hard-coding, you can deal with the user who renames the top-level page to main.php. And you just know someone will. 
Sorry, I don't understand this.
Where and how should I use this code so that only .html extensies are used?
That code does not stop the user changing the names, it gets the names set in the Advanced naming section. One should use engine.getPageExtension() instead of writing '.html'
|
|
|
Posts:
4,093
Registered:
4-Aug-2006
|
|
|
Re: Variants with iOS 15.4 not working.
Posted:
4 Apr 22, 00:58
in response to: JeffTucker
|
|
|
I have not fully supported changing the page naming settings, reset the page index suffix to .html.
Two pieces of code that I often forget I should use. Of course, routine testing doesn't reveal that it's a problem, because most of us never change the values. I always have to go hunting for them. engine.getIndexPageName()
engine.getPageExtension()
If you use these instead of hard-coding, you can deal with the user who renames the top-level page to main.php. And you just know someone will. 
With the new skin properties I can just turn the settings off and happily ignore them 
|
|
|
Posts:
2,269
Registered:
14-Dec-2007
|
|
|
Re: Variants with iOS 15.4 not working.
Posted:
4 Apr 22, 08:15
in response to: RobM
|
|
|
That code does not stop the user changing the names, it gets the names set in the Advanced naming section. One should use engine.getPageExtension() instead of writing '.html'
Sorry I still don’t understand this!
I assume that if if I put in init.bsh the code String ext= engine.getPageExtension();
I see which extension has been selected by the user.
But can I overrule that setting with a statement like engine.setPageExtension(“.html”);
? And what should I code in hints.jap to select .html as default extension?
|
|
|
Posts:
8,094
Registered:
31-Jan-2006
|
|
|
Re: Variants with iOS 15.4 not working.
Posted:
4 Apr 22, 08:54
in response to: AndreWolff
|
|
|
You're missing the point.
If a user changes the file extension from .html to .php, he's got a good reason for doing so, and the skin should not second-guess that decision.
The jAlbum variables take care of this automatically. So ${closeupPath} will be slides/mydog.html. But if the user changes the file extension to .php, then ${closeupPath} will be slides/mydog.php.
The problem arises when the skin is creating a page that the core doesn't know about. In my skins, the info page is called infopage.html. But if the user has chosen to use .php as the file extension, my skin needs to use that extension, instead, and point to infopage.php.
So, instead of coding: <a href='infopage.html'>Click here for info</a>
The skin should code: <a href='infopage<%=engine.getPageExtension()%>'>Click here for info</a>
|
|
|
Posts:
8,094
Registered:
31-Jan-2006
|
|
|
Re: Variants with iOS 15.4 not working.
Posted:
4 Apr 22, 08:58
in response to: JeffTucker
|
|
|
And in init.bsh, when I'm creating the page from the skin's template for the info page: File iptemplate = new File(skinDirectory + "/infopage.htt");
File ipoutput = new File(rootOutputDirectory + "/infopage" + engine.getPageExtension());
engine.processTemplateFile(iptemplate, ipoutput);
|
|
|
Posts:
2,269
Registered:
14-Dec-2007
|
|
|
Re: Variants with iOS 15.4 not working.
Posted:
4 Apr 22, 09:44
in response to: JeffTucker
|
|
|
OK now I understand it, thanks.
But I am still curious whether it is possible to select a ,html extension independent of the setting on the naming page!
|
|
|
Posts:
2,269
Registered:
14-Dec-2007
|
|
|
Re: Variants with iOS 15.4 not working.
Posted:
4 Apr 22, 09:45
in response to: RobM
|
|
|
I have not fully supported changing the page naming settings, reset the page index suffix to .html. Out of curiosity, why are you renaming it to htm?
I did check my backup files, the selected file extension was always .htm
IfI use that extension it can't be displayed on my iPad
This looks like an iOS bug!
|
|
|
Posts:
8,094
Registered:
31-Jan-2006
|
|
|
Re: Variants with iOS 15.4 not working.
Posted:
4 Apr 22, 09:48
in response to: AndreWolff
|
|
|
But I am still curious whether it is possible to select a ,html extension independent of the setting on the naming page!
You should never do this. If the user has chosen a different extension, he doesn't want the skin to change it.
|
|
|
Posts:
4,093
Registered:
4-Aug-2006
|
|
|
Re: Variants with iOS 15.4 not working.
Posted:
4 Apr 22, 11:09
in response to: AndreWolff
|
|
|
I have not fully supported changing the page naming settings, reset the page index suffix to .html. Out of curiosity, why are you renaming it to htm?
I did check my backup files, the selected file extension was always .htm
IfI use that extension it can't be displayed on my iPad
This looks like an iOS bug!
Make sure that all your albums are using just .htm or just .html! it might just be that mixing them is the problem. I believe it is not recommended anyway.
|
|
|
Posts:
2,269
Registered:
14-Dec-2007
|
|
|
Re: Variants with iOS 15.4 not working.
Posted:
4 Apr 22, 11:16
in response to: RobM
|
|
|
Make sure that all your albums are using just .htm or just .html! it might just be that mixing them is the problem. I believe it is not recommended anyway.
The only file I use in this test is index.htm
I did contact Apple:
They said it is probably a problem of the server.
And indeed ik I enter in the Safari URL field on my iPad
https://andrewolff.jalbum.net/test/
I get the error, but if I enter
https://andrewolff.jalbum.net/test/index.htm
it is OK.
Edited by: AndreWolff on 4 Apr 2022, 11:19
|
|
|
Posts:
424
Registered:
25-Mar-2005
|
|
|
Re: Variants with iOS 15.4 not working.
Posted:
4 Apr 22, 12:46
in response to: AndreWolff
|
|
|
It looks like our server is sending the wrong content-length when using index.htm as index file, and the page is using gzip compression (which all compressable files are on our server). And the Safari browser chokes on that (both on MacOS and iOS).
I'll look into this today.
However, due to server optimization it's much faster to use the normal index.html index file name, so please don't use the .htm extension. (But the skin should, as others have said, always use the extension set by the user.)
(When fetching a "folder" URL ending with a / the server immediately tries to fetch the index.html. If that fails it starts a process of checking if the folder exists at all and if it does it tries to fetch the various index-files. There are 580 times more index.html files on our servers than index.htm files so it more likely the folder doesn't exist than that there is an index.htm file there.)
|
|
|
Posts:
2,269
Registered:
14-Dec-2007
|
|
|
Re: Variants with iOS 15.4 not working.
Posted:
4 Apr 22, 13:09
in response to: AnCa
|
|
|
I see this problem in many places in my sample albums, I must have seen that in the past if it was a problem at that time.
So I think this problem is caused by a recent change of the server software.
Edit:
If the htm extension is used and the link to the URL ends with a / I just add index.htm after the slash. That is the fastest way to repair the problem and I think the fastest way to display the page.
I am not goiing to change all htm extensions to html extensions, because the old htm files are not automaticalle deleted, see my feature request Please remove old index files.
Edited by: AndreWolff on 4 Apr 2022, 13:11
|
|
|
Posts:
8,094
Registered:
31-Jan-2006
|
|
|
Re: Variants with iOS 15.4 not working.
Posted:
4 Apr 22, 15:06
in response to: AnCa
|
|
|
(When fetching a "folder" URL ending with a / the server immediately tries to fetch the index.html. If that fails it starts a process of checking if the folder exists at all and if it does it tries to fetch the various index-files. There are 580 times more index.html files on our servers than index.htm files so it more likely the folder doesn't exist than that there is an index.htm file there.)
I trust you're looking for all of these: https://www.ipage.com/help/article/scripting-how-to-set-default-page-priority

|
|
|
Posts:
424
Registered:
25-Mar-2005
|
|
|
Re: Variants with iOS 15.4 not working.
Posted:
4 Apr 22, 15:18
in response to: JeffTucker
|
|
|
"Standard Default Pages" Yes, standards are great. Too bad they are so many.
(jAlbum hosting only supports index.html and index.htm.)
|
|
|
Posts:
2,269
Registered:
14-Dec-2007
|
|
|
Re: Variants with iOS 15.4 not working.
Posted:
4 Apr 22, 15:23
in response to: AnCa
|
|
|
(jAlbum hosting only supports index.html and index.htm.)
On an iPad and iPhone only index.html, no index.htm
|
|
|
|
Legend
|
|
Forum admins
|
|
Helpful Answer
|
|
Correct Answer
|
|