markc Posted March 25, 2019 Share Posted March 25, 2019 Update: I just changed it to a closure and it started working 🙂 <?php //error_log(__FILE__); add_hook('AdminAreaPage', 1, function ($vars) { //error_log(__METHOD__); $filename = $vars['filename']; $hiddenstatus = $_GET['show_hidden']; if ($filename == "clients" && $hiddenstatus != '1') { $url = 'clients.php?filter=1&show_hidden=1'; header( 'Location: '.$url ); } }); 0 Quote Link to comment Share on other sites More sharing options...
Marek Maurizio Posted April 12, 2019 Share Posted April 12, 2019 Dear god this "feature" is so dumb and annoying, what were they thinking? Can I downgrade to 7.6 from 7.7? 0 Quote Link to comment Share on other sites More sharing options...
markc Posted April 12, 2019 Share Posted April 12, 2019 Totally agree. I have no idea or suggestions about downgrading. The code snippet I posted above almost solves the problem but it introduces another one when trying to page through clients... the code always forces the first page of results no matter where you try to page to... so it's useless as is. The WHMCS devs really really HAVE TO provide an option to disable this "feature". It's wasted so much of our time and does absolutely nothing to enhance the usability of the View/Search Clients page. 0 Quote Link to comment Share on other sites More sharing options...
WarpConduit Computing Posted June 18, 2019 Share Posted June 18, 2019 Please try this updated code if you need support for pagination: add_hook( 'AdminAreaPage', 1, function ( $vars ) { if ( $vars['filename'] == 'clients' && $_GET['show_hidden'] != '1' ) { $url_parts = parse_url(html_entity_decode($_SERVER['REQUEST_URI'])); parse_str($url_parts['query'], $query_vars); $query_vars['show_hidden'] = 1; $url_parts['query'] = http_build_query($query_vars); $redirect_url = ((isset($url_parts['path']) ? "{$url_parts['path']}" : '') . (isset($url_parts['query']) ? "?{$url_parts['query']}" : '') . (isset($url_parts['fragment']) ? "#{$url_parts['fragment']}" : '')); header( 'Location: '.$redirect_url, true, 307 ); } } ); Â Also, if you have a more complex URL structure this longer version is for you: add_hook('AdminAreaPage', 1, function($vars){ if ($vars['filename'] == 'clients' && $_GET['show_hidden'] != '1'){ $current_url = ((!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off') ? 'https' : 'http').'://'.$_SERVER['SERVER_NAME'].html_entity_decode($_SERVER['REQUEST_URI']); $url_parts = parse_url($current_url); parse_str($url_parts['query'], $query_vars); $query_vars['show_hidden'] = 1; $url_parts['query'] = http_build_query($query_vars); $redirect_url = ((isset($url_parts['scheme']) ? "{$url_parts['scheme']}:" : ''). ((isset($url_parts['user']) || isset($url_parts['host'])) ? '//' : ''). (isset($url_parts['user']) ? "{$url_parts['user']}" : ''). (isset($url_parts['pass']) ? ":{$url_parts['pass']}" : ''). (isset($url_parts['user']) ? '@' : ''). (isset($url_parts['host']) ? "{$url_parts['host']}" : ''). (isset($url_parts['port']) ? ":{$url_parts['port']}" : ''). (isset($url_parts['path']) ? "{$url_parts['path']}" : ''). (isset($url_parts['query']) ? "?{$url_parts['query']}" : ''). (isset($url_parts['fragment']) ? "#{$url_parts['fragment']}" : '')); header('Location: '.$redirect_url, true, 307); } }); Â 0 Quote Link to comment Share on other sites More sharing options...
N8Solutions Posted July 4, 2019 Share Posted July 4, 2019 On 6/18/2019 at 8:13 AM, WarpConduit Computing said: Please try this updated code if you need support for pagination: add_hook( 'AdminAreaPage', 1, function ( $vars ) { if ( $vars['filename'] == 'clients' && $_GET['show_hidden'] != '1' ) { $url_parts = parse_url(html_entity_decode($_SERVER['REQUEST_URI'])); parse_str($url_parts['query'], $query_vars); $query_vars['show_hidden'] = 1; $url_parts['query'] = http_build_query($query_vars); $redirect_url = ((isset($url_parts['path']) ? "{$url_parts['path']}" : '') . (isset($url_parts['query']) ? "?{$url_parts['query']}" : '') . (isset($url_parts['fragment']) ? "#{$url_parts['fragment']}" : '')); header( 'Location: '.$redirect_url, true, 307 ); } } ); Â Also, if you have a more complex URL structure this longer version is for you: add_hook('AdminAreaPage', 1, function($vars){ if ($vars['filename'] == 'clients' && $_GET['show_hidden'] != '1'){ $current_url = ((!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off') ? 'https' : 'http').'://'.$_SERVER['SERVER_NAME'].html_entity_decode($_SERVER['REQUEST_URI']); $url_parts = parse_url($current_url); parse_str($url_parts['query'], $query_vars); $query_vars['show_hidden'] = 1; $url_parts['query'] = http_build_query($query_vars); $redirect_url = ((isset($url_parts['scheme']) ? "{$url_parts['scheme']}:" : ''). ((isset($url_parts['user']) || isset($url_parts['host'])) ? '//' : ''). (isset($url_parts['user']) ? "{$url_parts['user']}" : ''). (isset($url_parts['pass']) ? ":{$url_parts['pass']}" : ''). (isset($url_parts['user']) ? '@' : ''). (isset($url_parts['host']) ? "{$url_parts['host']}" : ''). (isset($url_parts['port']) ? ":{$url_parts['port']}" : ''). (isset($url_parts['path']) ? "{$url_parts['path']}" : ''). (isset($url_parts['query']) ? "?{$url_parts['query']}" : ''). (isset($url_parts['fragment']) ? "#{$url_parts['fragment']}" : '')); header('Location: '.$redirect_url, true, 307); } }); Â Has anyone tried this code? Does it work? I thought I could get use to the inactive clients being hidden but I just find it very annoying. The inactive clients aren't visible from the dropdown when looking at another client so I have to go back to the client screen, click to show the inactive clients, then click on the client I want to see. This has created too many unnecessary steps. 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted July 4, 2019 Share Posted July 4, 2019 5 minutes ago, N8Solutions said: Has anyone tried this code? Does it work? the first hook you quoted does - never tried the second... effectively, you can't turn "Hide Inactive" on with this hook running, so hidden clients are shown on the Client List page... it will have no impact on whether a hidden client is listed in the dropdown - they still won't be. if this is "fixed" in v7.8, it will only have taken them the best part of 6 months. 🙄 1 Quote Link to comment Share on other sites More sharing options...
N8Solutions Posted July 4, 2019 Share Posted July 4, 2019 @brian! Thank you for that information and for letting me know the hook wouldn't have an effect on the dropdown list of clients. 0 Quote Link to comment Share on other sites More sharing options...
Marek Maurizio Posted July 4, 2019 Share Posted July 4, 2019 Let's stop trying, every solution is a bad hack that tampers with parameters. It gives at best a false sense of security that makes you more prone to errors when it fails. If it's not removed in the next version I will seriously consider moving away from the platform. 3 Quote Link to comment Share on other sites More sharing options...
markc Posted July 5, 2019 Share Posted July 5, 2019 Marek, I totally agree. We got so fed up with this glitch we had to mark all users as active and make manual notes about who is really not active and hack the provisioning backend to take this into account. We would love to send WHMCS a bill for all the lost hours this has cost us! We have started testing an open source WordPress/Woocommerce solution for our specific needs! 1 Quote Link to comment Share on other sites More sharing options...
TechDaddies Posted July 5, 2019 Share Posted July 5, 2019 Stumbled across this thread while trying to figure out if there was a setting I was missing to disable this somewhere because I didn't want to resort to editing the template. We have a TON of "Inactive" users who are actively paying one-off invoices. Such a hassle to have to hit that button all the time to show the missing clients. WHMCS really needs to remove this "feature" or at least add a setting to completely disable it. 1 Quote Link to comment Share on other sites More sharing options...
garybarr Posted July 8, 2019 Author Share Posted July 8, 2019 Yes, it was one giant turd of an addition to the software... and it's made us look into a different route for the future and replacing WHMCS.  We have too many 1-invoice customers that we did a job for but don't have ongoing services. So it caused us to start having tons of duplicate accounts for a customer, because people kept thinking they didn't have an account. I really wonder what WHMCS was thinking (or wasn't thinking) with this completely stupid addition and with no way to turn it off. 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted July 9, 2019 Share Posted July 9, 2019 19 hours ago, garybarr said: I really wonder what WHMCS was thinking (or wasn't thinking) with this completely stupid addition and with no way to turn it off. about the only thing harder than getting WHMCS to add a feature (which is no small task in itself!), is after WHMCS have added it, is then getting them to fix it because what they originally did wasn't tested or developed to a sufficient standard... or increasingly more likely these days, wasn't even requested by their users in the first place. 🙄 0 Quote Link to comment Share on other sites More sharing options...
garybarr Posted July 9, 2019 Author Share Posted July 9, 2019 (edited) It's like they don't want us to use there system for customers who aren't "Active", which if they aren't active, they don't get more money. Odd how little "new features" like that happen and don't get fixed. LOL Edited July 9, 2019 by garybarr 0 Quote Link to comment Share on other sites More sharing options...
TechDaddies Posted August 29, 2019 Share Posted August 29, 2019 Still waiting for this stupidity to be removed or be optional. Just upgraded and now have to go back and re-apply the template edit to fix it. 1 Quote Link to comment Share on other sites More sharing options...
garybarr Posted August 30, 2019 Author Share Posted August 30, 2019 Just showing that the desires of the customers are not on the top of their list. This is literally a few lines of code to fix, yet they don't have time to fix it causing continued headaches for many.  0 Quote Link to comment Share on other sites More sharing options...
brian! Posted August 30, 2019 Share Posted August 30, 2019 7 hours ago, garybarr said: Just showing that the desires of the customers are not on the top of their list. This is literally a few lines of code to fix, yet they don't have time to fix it causing continued headaches for many.  is it my imagination, or did another member create a thread earlier this month asking if this was going to be fixed in v7.8, and it never even got a reply from the staff ?? 0 Quote Link to comment Share on other sites More sharing options...
TechDaddies Posted October 4, 2019 Share Posted October 4, 2019 Another release, another disappointment. This is a 5 minute fix to an idiotic feature. Come on guys. We're paying for this software, all we're asking for is a way to turn this crap off if we don't want to use it. 0 Quote Link to comment Share on other sites More sharing options...
garybarr Posted October 6, 2019 Author Share Posted October 6, 2019 Yes, this software is so hard to use for our customers, it takes years and even decades to get basic things added... And when they break something that makes people made, they plug on without a care in the world about it.  It's time for Blesta to get bigger and take over, they care way more, better support. It just lacked a couple things we had to have.   0 Quote Link to comment Share on other sites More sharing options...
RBennett Posted October 19, 2019 Share Posted October 19, 2019 I'm having the same problem in addition to I can't seem to figure out how to change the client status from inactive to active... 0 Quote Link to comment Share on other sites More sharing options...
WHMCS ChrisD Posted January 1, 2020 Share Posted January 1, 2020 On 19/10/2019 at 1:59 PM, RBennett said: I'm having the same problem in addition to I can't seem to figure out how to change the client status from inactive to active... You can change this on the client profile tab just change the Status to Active 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted January 1, 2020 Share Posted January 1, 2020 6 hours ago, WHMCS ChrisD said: You can change this on the client profile tab just change the Status to Active but wouldn't that have a potential impact on the users' license and how much they are being charged... ? https://www.whmcs.com/members/index.php/knowledgebase/281/Pricing-Changes-FAQ.html Quote We are changing from an unlimited license model to a tiered pricing structure based on the number of active clients within a WHMCS installation.An active client is defined as a client with at least one active product, service, add-on or domain. kerching. 🤑 btw - there seems to be something wrong with the condensed mode in unread content / latest activity - always appears to show the expanded view. 0 Quote Link to comment Share on other sites More sharing options...
doublet Posted April 1, 2020 Share Posted April 1, 2020 Still no way to disable this from the web interface ? 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted April 1, 2020 Share Posted April 1, 2020 4 hours ago, doublet said: Still no way to disable this from the web interface ?  no. 0 Quote Link to comment Share on other sites More sharing options...
garybarr Posted April 1, 2020 Author Share Posted April 1, 2020 Yeah, they seem to see that it is working exactly how they want, even though it is angering most.  So every time they update, I do this fix:  /home/public_html/admin/templates/blend/footer.tpl Change line 25 FROM:     <input id="intelliSearchHideInactive" type="hidden" name="hide_inactive" value="1"> TO:        <input id="intelliSearchHideInactive" type="hidden" name="hide_inactive" value="0"> Change line 90         From:    <span class="hide-inactive"><input type="checkbox" id="intelliSearchHideInactiveSwitch" data-size="mini" data-label-text="{lang key="global.hideInactive"}" checked="checked"></span> To:      <span class="hide-inactive"><input type="checkbox" id="intelliSearchHideInactiveSwitch" data-size="mini" data-label-text="{lang key="global.hideInactive"}" unchecked="checked"></span>  It then works properly, it's the same as above, but just with the exact changes needed. 0 Quote Link to comment Share on other sites More sharing options...
bear Posted April 1, 2020 Share Posted April 1, 2020 On 1/1/2020 at 7:01 AM, brian! said: btw - there seems to be something wrong with the condensed mode in unread content / latest activity - always appears to show the expanded view. Weird, I couldn't get it to show expanded at all, and Chris had to provide a different view/link for me to be able to have that. 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.