path to /syntaxhighlighter/ in artikel.tpl

Please report bugs here!

Moderator: Thorsten

Post Reply
pmfuser
Posts: 106
Joined: Tue Apr 01, 2014 7:00 am

path to /syntaxhighlighter/ in artikel.tpl

Post by pmfuser »

Hi,

I installed phpMyFAQ 2.8.8, and noticed that 404s are generated when visitors are on the any of FAQ article pages as the path to some files in artikel.tpl template is wrong. Here is the part of the code in question:

Code: Select all

<style scoped>
                @import "assets/js/syntaxhighlighter/styles/shCore.css";
                @import "assets/js/syntaxhighlighter/styles/shThemeDefault.css";
            </style>
            <script src="assets/js/syntaxhighlighter/scripts/shCore.js"></script>
            <script src="assets/js/syntaxhighlighter/scripts/shAutoloader.js"></script>
            <script>
            SyntaxHighlighter.autoloader(
                'js jscript javascript  assets/js/syntaxhighlighter/scripts/shBrushJScript.js',
                'applescript            assets/js/syntaxhighlighter/scripts/shBrushAppleScript.js',
                'xml xhtml xslt html    assets/js/syntaxhighlighter/scripts/shBrushXml.js',
                'bash shell             assets/js/syntaxhighlighter/scripts/shBrushBash.js',
                'php                    assets/js/syntaxhighlighter/scripts/shBrushPhp.js',
                'sql                    assets/js/syntaxhighlighter/scripts/shBrushSql.js'
            );
            SyntaxHighlighter.all();
            </script>
As I have friendly URLs turned ON, this is how the full path to an article looks like (from 404 error):

mysite.com/faqpath/content/1/10/en/some-article.html?highlight=difference

and the path to any of the CSS or JS files from the code above looks like this:

mysite.com/faqpath/content/1/10/en/assets/js/syntaxhighlighter/styles/shCore.css

instead of

mysite.com/faqpath/assets/js/syntaxhighlighter/styles/shCore.css

Also, it seems these requests are triggered by some user agents only, mostly those that are Apple based, and I also notice the ?highlight=difference at the end of URL (some, not all of them in 404s).

For my curiosity, what is the purpose of these CSS and JS files? What triggers the highlighting option?

Thanks

P.S.
I also have a problem with not being able to see articles when logged on, but found that this is in the works with the next release, so thank you for that.
Thorsten
Posts: 15560
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: path to /syntaxhighlighter/ in artikel.tpl

Post by Thorsten »

Hi,

I'll fix it with 2.8.9: https://github.com/thorsten/phpMyFAQ/issues/831

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
pmfuser
Posts: 106
Joined: Tue Apr 01, 2014 7:00 am

Re: path to /syntaxhighlighter/ in artikel.tpl

Post by pmfuser »

Thanks.

I also wanted to make a note that in some cases of 404s the path is .../content/... while in others it is ...//content/... - double slash.
pmfuser
Posts: 106
Joined: Tue Apr 01, 2014 7:00 am

Re: path to /syntaxhighlighter/ in artikel.tpl

Post by pmfuser »

In relation to this:

I just noticed that XML sitemap lists all files with double slash which is wrong (...//content/...). How can I fix this?

Thanks
Thorsten
Posts: 15560
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: path to /syntaxhighlighter/ in artikel.tpl

Post by Thorsten »

Hi,

it'll be fixed with 2.8.9, too

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
pmfuser
Posts: 106
Joined: Tue Apr 01, 2014 7:00 am

Re: path to /syntaxhighlighter/ in artikel.tpl

Post by pmfuser »

I remember this being fixed, but I see that admin area is still with the double slash. Not a big deal from SEO perspective, but not sure if it can affect any of the how the platform works, including the front end. In any case I believe it's wrong to have a double slash in URLs.

Thanks
Thorsten
Posts: 15560
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: path to /syntaxhighlighter/ in artikel.tpl

Post by Thorsten »

Hi,

I checked that in the admin section, too. When do you get the second slash?

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
pmfuser
Posts: 106
Joined: Tue Apr 01, 2014 7:00 am

Re: path to /syntaxhighlighter/ in artikel.tpl

Post by pmfuser »

Double slash is there all the time for as long as I'm logged into admin panel. It goes mysite//admin/etc. FAQ itself when browsing as a visitor is fine (no matter if logged in or not). I just checked the sitemap.xml, and that is fine as well.
So, it's admin area only.
Thorsten
Posts: 15560
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: path to /syntaxhighlighter/ in artikel.tpl

Post by Thorsten »

Hi,

just re-checked it and I cannot reproduce it. Also cannot repdroduce it on http://demo.phpmyfaq.de/

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
Post Reply