Jump to content

return from clientedit hook -> Blank Page


tgodd

Recommended Posts

I suppose what I really need is a method to redirect the page.

 

Without the hook after edit it redirects to :

hxxps://www.mypage.com/WHMCS/admin/clientssummary.php?userid=001

 

Whereas with the hook after edit it directs to:

hxxps://www.mypage.com/WHMCS/admin/clientsprofile.php?action=savedetails&userid=001

 

I need to redirect it to the client summary page..

 

How can I do this ?

Link to comment
Share on other sites

By adding the following line at the exit point of the hook routine it redirects to where I need.

 

echo '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">\n<html>\n<head>\n<title>Your Page Title</title>\n<meta http-equiv="REFRESH" content="0;url=http://www.mypage.com/WHMCS/admin/clientssummary.php?userid=' . $UserId . '"></HEAD>\n<BODY>\n</BODY>\n</HTML>\n';

Link to comment
Share on other sites

My method only works some of the time.

How do I set a cookie or session value to have it return to either the admin client profile page or also acceptable would be to have it return to the admin client summary page.

The hook should not return you to a blank page anyway, and I beleive this to be a bug.

Link to comment
Share on other sites

OK surely I am not the only one with this problem.

 

Everything in the action hook works.

 

The page does not reload or redirect or whatever.

What is the good of hooks if the page flow is interupted..

 

Can ANYONE help here????????

Link to comment
Share on other sites

Have you looked at your MaxExecutionTime variable in php, make sure its set to 120 or higher, it could be timing out before completing the script.

 

I did try adding set_time_limit(120) to my hook code.

 

Still the page does not return or redirect.

 

I do certainly appreciate your help and suggestions.

 

FYI I have the latest stable version installed.

Link to comment
Share on other sites

  • 2 months later...

I'm glad I'm not the only one going crazy here...

 

I have also encountered this issue in coding a couple of routines for the contactadd and contactedit hook points. I can verify that my hook functions are indeed completing, and can have it die with an error message on the last possible line, even adding a routine to just output something in a lower priority to verify that I didn't miss something.

 

The code is simply stopping, it appears to be a redirect issue, but unsure how best to resolve this as I agree it must be a bug that should be resolved in future releases.

 

I do know that contacts and clients behave differently in the way they are handled... here is what I've gathered in the hook behavior:

 

The hook on the BACKEND CLIENT ADD passes only entered info (including clear text password and new userid)

The hook on the BACKEND CONTACT ADD passes full info from DB, encoded password, no contactid, userid from client, subaccount field

The hook on FRONTEND CLIENT ADD passes only entered info (including clear text password and new userid)

The hook on FRONTEND CONTACT passes full info from DB, encoded password, no contactid, userid from client, subaccount field

 

Hope that is of use to someone.

 

Regards,

Steven

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