Jump to content

Poss v4 bug or I have something set wrong.


tomdchi

Recommended Posts

I have a problem with custom pages not displaying properly and I have tracked it down to a missing / in the header causing the style sheet link to be broken. I have the url's set properly in the admin and I only have this problem with a custom page. I tried a bunch of things and finaly went in and removed

{if $systemurl}<base href="{$systemurl}" />{/if}

from header.tpl and changed the stylesheet link to:

<link rel="stylesheet" type="text/css" href="{$systemurl}/templates/{$template}/style.css" />

 

This seems to have worked and now everything displays properly but I am wondering what I may have broken by removing

{if $systemurl}<base href="{$systemurl}" />{/if}

 

Any ideas or is that a bug?

Link to comment
Share on other sites

I have been waiting for someone to find this as well.

The base href is set to http by default on any non whmcs pages (custom pages) and when you access a custom page via https results in the base href being set to http incorrectly.

Here is my fix for it

Replace

{if $systemurl}<base href="{$systemurl}" />{/if}
with

{php}global $CONFIG;$this->assign('url', (($_SERVER['HTTPS'] == 'on') ? $CONFIG['SystemSSLURL'] : $CONFIG['SystemURL']));{/php}
<base href="{$url}/" />

This is definatly needed for the mod rewrite links for SEO pages

Edited by sparky
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated