Jump to content

Why my links in the Client NAV bar dont work?


hostxls

Recommended Posts

Hello,

 

I hope someone can help me out here.

Due to the new upgrade of WHMCS the redirect url's of the navigation bar has somehow been changed. Well some of them.

 

The link of my Knowledge base is not working anymore.

The strange thing is that all the other links seems to be intact, accept for the "Knowledge base"

 

<a href="/clients/index.php?rp=/announcements">
                       Aankondigingen
                               </a>

 

This looks oke, right? but still I will received this Error when click on it.

 

See image included.

 

WHMCS_Client Nav Link.png

Screenshot_33.png

Link to comment
Share on other sites

try installing the v7.2.1 knowledgebase hotfix and see if that resolves it...

 

https://forum.whmcs.com/showthread.php?129326-CORE-11298-Call-to-a-member-function-isHidden()-on-null-Error-On-Knowledgebase&p=517066#post517066

 

An issue has been identified in the 7.2.1 release - published on 16th May, 2017 - that is affecting the ability to view knowledgebase articles via the client area when translations are present.

 

This manifests itself as an "Oops" page, and the following error:

exception 'Whoops\Exception\ErrorException' with message 'Call to a member function isHidden() on null' in /path/to/whmcs/vendor/whmcs/whmcs-foundation/lib/Knowledgebase/Article.php:0

I assume you're not seeing that specific error because you don't have display errors enabled.

Link to comment
Share on other sites

Oh, what a wonderful horrible fix. It makes things worst then it was. :mad:

 

Now I can not enter the client area because the fix has changed all redirect link.

 

:) Not your fault, Brian. Its the fix that made it worst. I'm putting a backup back and will start fresh.

 

What is the link to my client area???? normally it would be http://xxxxx.com/client wright?

Edited by hostxls
Link to comment
Share on other sites

Oh what a wonderful horrible fix. It makes things worst then it was. :mad:

Now I can not enter the client area because the fix has changed all redirect link.

What is the link to my client area???? normally it would be http://xxxxx.com/client right?

it should be for you.

 

can you get into the admin area and enable display errors from setup -> general settings -> others ... that might at least give you some sort of clue as to what's going on.

 

other things to try will be...

 

1. getting hold of the v7.2.1 full download zip and replacing the "hotfixed" file - there's only one file to change (or 2 if you include the hash-list file)...

2. have you tried all the Friendly URL options ?

 

http://docs.whmcs.com/Friendly_URLs

Link to comment
Share on other sites

Oke Brian, I got the Client area back under control but....still the knowledge base isn't working. And uploading the new vendor and resource file are costing more problems. maybe I'm doing something wrong.

 

The strange thing is that when I'm clicking on the Client area button on the website it will redirect me to the Knowledgebase using this link : https://hostxls.com/clients/knowledgebase.php

 

But the Knowledgebase it self has a different link: https://hostxls.com/clients/index.php?rp=/knowledgebase

 

what is costing a Oops error!

 

Is it possible to manually change the link?

Edited by hostxls
Link to comment
Share on other sites

Oke Brian, I got the Client area back under control but....still the knowledge base isn't working. And uploading the new vendor and resource file are costing more problems. maybe I'm doing something wrong. Can you help me out here.

sure - feel free to PM me.

Link to comment
Share on other sites

Oke Brian, I got the Client area back under control but....still the knowledge base isn't working. And uploading the new vendor and resource file are costing more problems. maybe I'm doing something wrong.

The strange thing is that when I'm clicking on the Client area button on the website it will redirect me to the Knowledgebase using this link : https://hostxls.com/clients/knowledgebase.php

But the Knowledgebase it self has a different link: https://hostxls.com/clients/index.php?rp=/knowledgebase

what is costing a Oops error!

if you enabled display errors, it might tell you... if it's the same error as mentioned in the hotfix, then I assumed the hotfix would fix it... I suppose there could be an existing redirection that it clashing with the Friendly URLs feature :?:

 

Is it possible to manually change the link?

you could use an action hook - that should hardcode it to use knowledgebase.php... but you shouldn't need it if the redirection was working correctly.

 

<?php

use WHMCS\View\Menu\Item as MenuItem;

add_hook('ClientAreaPrimaryNavbar', 1, function (MenuItem $primaryNavbar)
{
   if (!is_null($primaryNavbar->getChild('Knowledgebase'))) {
       $primaryNavbar->getChild('Knowledgebase')
                     ->setUri('knowledgebase.php');
   }
})

Link to comment
Share on other sites

Before installing the new files i renamed the old one. And now I have renamed them back and remove the new one.

So thats smart :) Yes and now I'm back where i started.

 

- - - Updated - - -

 

I have to leaf the office unfittingly. Can we pick this up later at night or tomorrow.

 

Sorry for this.

Link to comment
Share on other sites

He brian, how are you. listen you mentioned something like "enabled display errors". where can I enable this?

And can you show me how to get to the Knowledge menu (the pad) to change the link.

 

This link is talking about a solution but doesn't tell you exactly where to go and to find the file you supposed to change.

http://docs.whmcs.com/Client_Area_Navigation_Menus_Cheatsheet#Changing_where_a_Menu_Item_Points_To

 

- - - Updated - - -

 

Oh and can you tell me what this message is in the log.

[TABLE=class: datatable, width: 100%]

[TR]

[TD]30/05/2017 04:37[/TD]

[TD]

Smarty Error: Unable to load template file '/home/hostxls/public_html/clients/templates/sixcustom/error/page-not-found.tpl' IP 51.255.65.44

[/TD]

[/TR]

[/TABLE]

Edited by hostxls
Link to comment
Share on other sites

Hello,

 

He brian, how are you. listen you mentioned something like "enabled display errors". where can I enable this?

setup -> general settings -> other (tab) -> display errors checkbox

 

And can you show me how to get to the Knowledge menu (the pad) to change the link.

This link is talking about a solution but doesn't tel you exactly where to go and to find the file you supposed to change.

http://docs.whmcs.com/Client_Area_Navigation_Menus_Cheatsheet#Changing_where_a_Menu_Item_Points_To

create a new .php file in /includes/hooks (perhaps call it kbnavbar.php) and paste the code from the hook I posted yesterday above..

 

that should hardcode the link to knowledgebase.php - but if your redirection was working correctly, you shouldn't really need it.

 

Oh and can you tell me what this message is in the log.

[TABLE=class: datatable, width: 100%]

[TR]

[TD]30/05/2017 04:37[/TD]

[TD]

Smarty Error: Unable to load template file '/home/hostxls/public_html/clients/templates/sixcustom/error/page-not-found.tpl' IP 51.255.65.44

[/TD]

[/TR]

[/TABLE]

with v7.2, WHMCS introduced some new templates in separate folders, namely "Error" (page not found templates) and "store" (MarketConnect).

 

if you're using a custom template, then your template wouldn't have been updated with these new template files... the short-term fix for that will be to copy the error and/or store folders from "Six" to your custom template and that should get rid of the page not found template errors... long-term, you'll need to go through all the custom templates to make sure they're up to date with v7.2.1

 

btw - I just added a translated kb article to my v7.2.1 dev, and it caused the same issue you have... but manually adding that hotfix fixed it for me. :idea:

Link to comment
Share on other sites

but if your redirection was working correctly, you shouldn't really need it.[/color]]

 

That is confusing because it isn't working due to the upgrade. That means something is wrong with the upgrade but I will not try to find that out, doesn't have the time for it but I will follow your lead in this. one moment, let me try it.

Link to comment
Share on other sites

Nope! it didn't solve the problem. the Oops! still remains.

Now the redirect from the website to the client area is going straight to Oops!

 

I have called the file newnavbar.php

 

 

The moment I'm activated the php file it will show the Oops! Error and then the client area is not visible.

 

Where can I change the file uri. maybe that will help.

 

I need to change this link https://hostxls.com/clients/index.php?rp=/knowledgebase

 

into this link: https://hostxls.com/clients/knowledgebase.php

 

I understand that it shouldn't be this way but this link https://hostxls.com/clients/index.php?rp=/knowledgebase is costing a Error for some reason i dont know.

Edited by hostxls
Link to comment
Share on other sites

The moment I'm activated the php file it will show the Oops! Error and then the client area is not visible.

Where can I change the file uri. maybe that will help.

only via a hook.

 

I need to change this link https://hostxls.com/clients/index.php?rp=/knowledgebase

into this link: https://hostxls.com/clients/knowledgebase.php

I understand that it shouldn't be this way but this link https://hostxls.com/clients/index.php?rp=/knowledgebase is costing a Error for some reason i dont know.

I think because you must have a translated kb article and you need the hotfix.

 

with the Friendly URLs option in setup -> general settings -> general you have three options...

 

Basic URLs => index.php?rp=/knowledgebase

Friendly index.php => index.php/knowledgebase

Full Friendly Rewrite => knowledgebase

 

with the hotfix in place, any of them should work. :idea:

Link to comment
Share on other sites

with the Friendly URLs option in setup -> general settings -> general you have three options...

 

Basic URLs => index.php?rp=/knowledgebase

Friendly index.php => index.php/knowledgebase

Full Friendly Rewrite => knowledgebase

 

with the hotfix in place, any of them should work. :idea:

 

I'm really sorry but this also doesn't work.

 

The hotfix contains of two files

1. sources

2 vendor

 

When activated this files I get a blank page.

Also the general settings will not have any effect at all.

 

This is very strange.

 

From the Home page > Client Area you will be redirected to the Knowledgebase.

But from another page in the client area going to the Knowledgebase is not working. I'am frustrating now.

Link to comment
Share on other sites

  • 2 weeks later...

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