Jump to content

Page title issue after update


Recommended Posts

Hi,

After updating to v8, Sitelock VPN does not produce a valid page title, it displays as 'store..title'. I have tried downloading a new copy of english.php then uploading to WHMCS>lang> but no change. See image.  Same happens with Six template.

Any ideas on how to fix this would be appreciated.

Regards,

Gary

 

sitelock_vpn_title.jpg

Edited by graisbeck
wording
Link to comment
Share on other sites

24 minutes ago, graisbeck said:

Any ideas on how to fix this would be appreciated.

hmmm... there's a duplicate entry of the string in the language file...

$_LANG['store']['sitelockvpn']['title'] = "SiteLock VPN";

you could take one of them out and see if that fixes it... i'm seeing this occurring on multiple sites, so it's not just yours.

Link to comment
Share on other sites

9 minutes ago, brian! said:

hmmm... there's a duplicate entry of the string in the language file...


$_LANG['store']['sitelockvpn']['title'] = "SiteLock VPN";

you could take one of them out and see if that fixes it... i'm seeing this occurring on multiple sites, so it's not just yours.

Nope.. still not correct!

Link to comment
Share on other sites

I can only find one v8 site where this works (though finding lots of users sites that don't sell MC products and sadly more that seemed to have stopped trading).

it's a beta1, but the double entry was in the beta1 files too - so didn't get noticed in 3 months... but it can't be that as the site is working (and it's using the same theme as yours)... wish I could work out why it's working (unless an update after b1 has broken this ?)

what must be happening is that WHMCS isn't passing 'sitelockvpn' in the language string variable for use in the pagetitle, so WHMCS then can't find the language string and it just outputs what you're seeing.

if that's the case, it might be temporarily fixable with a simple hook that reset the pagetitle variable on that page...

<?php

function hook_setpagetitle($vars)
{
	if ($vars['templatefile'] == 'store/sitelockvpn/index'){
		$pagetitle = Lang::trans('store.sitelockvpn.title');
		return array("pagetitle" => $pagetitle);
	}	
}
add_hook("ClientAreaPage", 1, "hook_setpagetitle");

if that works (can't test it as I don't have MC enabled in the dev), then it should tide you over until WHMCS decide if the above issue is a bug (it must be).

Link to comment
Share on other sites

22 minutes ago, brian! said:

if that works (can't test it as I don't have MC enabled in the dev), then it should tide you over until WHMCS decide if the above issue is a bug (it must be).

@brian! Thanks for that.. It fixed the page title but the breadcrumb is still incorrect. I've raised a ticket with WHMCS.

Thanks again.

Sitelock.jpg

Link to comment
Share on other sites

On 16/10/2020 at 16:15, graisbeck said:

Thanks for that.. It fixed the page title but the breadcrumb is still incorrect. I've raised a ticket with WHMCS.

then the hook could be tweaked to modify the last element of the breadcrumb array on this page...

but if WHMCS are aware of this, it's the sort of thing that can be easily hotfixed... if they don't look like they're going to do that, let me know and i'll get the hook to modify the breadcrumb too.

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