WP Integration failing - getting stuck on original page name

I'm trying to complete a WP Integration. I'm facing an odd issue.

The shortcode seems to get "locked" on the first page you input. I put in a sample page to get a feel for using the solution. Then, after deciding to move forward, I tried to choose a different page and every attempt fails. Using any URL other than the very first one results in the plugin being unable to follow the path to WHMCS.

I deleted the page and still nothing. I bring the page back from the trash bin and it works. Also, the plugin focuses on the name of the page and not its path. The page was originally named "Domains." The only way to get it to work was to enter .../Domains

And it had to be a capital "D" to work. What is going on? How can I get past this?

  • Adam Czajczyk

    Hello Rob,

    I hope you're well today and thank you for your question!

    I'm not quite sure if I understand you correctly. You mentioned that "shortcode gets locked" on a first page it's added to. For example:

    - there are two pages: "Page A" and "Page B"
    - you put shortcodes on a "Page A"
    - you cannot put it anymore on a "Page B" even if you trash the "Page A"

    Is that what happens or am I missing something? Let me know and please correct me if I misunderstood you.

    It would also be very helpful if you could grant me a support access to your site so I could take a closer look at its setup and also test the issue myself. In order to grant an access please follow this guide:

    https://premium.wpmudev.org/manuals/wpmu-dev-dashboard-enabling-staff-login/

    Best regards,
    Adam

  • Milan

    Hello Rob

    Hope you are well today and thanks for asking us. :slight_smile:

    I just tested this on my site,

    #1) Network activated plugin
    #2) Created two pages on main blog
    #3) Add in both's content

    [wcp_content]

    I am able to view portal on those pages without any issue. I did change pages alternatively to replicate this issue on my end, but I was not able to do so.

    But I can confirm that issue is still there on your end. Seems like There is something wrong in setup. Do you mind re-setting whole configurations for this plugin ?

    Also it would be awesome to conduct plugin conflict test at this point. I am tagging our Getting Support manual here, so you can find information about how to conduct plugin conflict test well. :slight_smile:

    Let me know how it goes. :slight_smile:
    Kind Regards,
    Milan

  • Milan

    Hello Rob

    Yes that's the first steps but not the only one. :slight_smile:

    I want you to recheck all your configuration in plugin. check things like, whmcs host url is valid( no extra space in it ), deactivate plugin for network sometime, just activate it on only main blog, then test with default WordPress standard themes like Tewentyfifteen TwentySixteen etc etc.

    Let me know how it goes. :slight_smile:
    Kind Regards,
    Milan

  • Rob

    Hi Milan,

    On my MU setup, there is no option to deactivate for the network but selectively activate for a site, even the main site. Given that, I tried deleting the plugin folder but when I reinstalled, it simply pulled the old data and we're right back to the same spot. Where is a proper uninstall function that will also remove database references? It seems like being able to just "wipe" the references might have solved this a long time ago.

    I set to a generic theme for a while. No difference.

    Rob

  • Rob

    Hi Milan,

    Thanks for getting back to me.

    I re-entered the URL for WHMCS and set the page to the same one you used and I'm getting the same failure. It continues to only respect the original domain entered.

    Screenshots are attached. Please let me know if you see anything wrong with the settings. The look right to me.

    I set up a fresh WPMU install on a different server to see if the environment for WP made a difference. It's a mixed result.

    I was able to successfully switch to a different page, which is good. This is the core problem. This is great for the new setup but it leaves me with having to either "clean" the current install or to wipe everything and start anew and hope it works. This takes us back to the proper uninstall of your plugin that hasn't been addressed.

    Items of note: In the new WPMU install, the URL continues to reference the page title instead of the slug. It also cares about capitalization which is weird. This means that if I first created the page with a title uses capital letters, so too must the URL even if I delete the page title or else I get the page failure (starthere.buzz/services vs starthere.buzz/Services). Any idea of what's going on here?

    I'm glad to be able to switch pages. Is there any way of cleaning up the original install or are we looking at nuking the whole thing?

    Rob

  • Rob

    Predrag,

    I changed the permalink of the page from focal.buzz/focalhosting (the actual permalink for the page) to focal.buzz/Hosting (using the page title with capitalization) and it "worked," so to speak.

    This, obviously, isn't ideal and isn't in line with the proper functioning of the plugin.

    Why does the plugin focus on the page title instead of its actual link? This is the same behavior I saw in the clean installation. Could something weird be going on with the permalink settings?

    Rob

  • Adam Czajczyk

    Hello Rob!

    You're recent post actually made me thinking why the plugin would care about page title here instead of simply picking up an ID of selected page and using it regardless of a title and slug. I reviewed plugins code briefly and found out that in case the plugin isn't getting proper data over HTTP(S) query, it's trying to "fix" it by reading the part of an URL and trying to convert it to a page/post slug. In other place it also reads the page title.

    This would much the scenario: the title is "Hosting" and the slug is "focalhosting" but if query either is "broken" or doesn't come through as expected the plugin then breaks the "focal.buzz/Hosting" URL to extract just "Hosting" from it and looks for a page of that slug.

    That being said, I'm not sure if I explained it clearly and if this indeed is a case but it would seem that the issue here is actually because the plugin is trying to "fix" another issue which probably is a "broken" query. Again, I'm not 100% sure about it but it's worth exploring.

    The question is how to diagnose it. I think it would be good to start with a regular WP debugging so please first add following lines to the "wp-config.php" file of your site:

    define('WP_DEBUG',true);
    define('WP_DEBUG_LOG',true);
    define('WP_DEBUG_DISPLAY',false);

    Then please set the WHMCS WordPress Integration plugin to the initial configuration (as it was when you posted your question here) and try replicating the issue. Hopefully this will produce a "/wp-content/debug.log" file which, hopefully as well, will carry some more detailed information on what's happening.

    After this is done please download aforementioned file from your server, rename it to "debug.txt", edit and strip any sensitive data (such as e.g. db access credentials) if they are there, and attach it to your replay here.

    Let's see where this will get us :slight_smile:

    Best regards
    Adam

  • Rob

    Hi Adam,

    Attached is the debug log file per your request.

    Let me know what you see!

    Rob

    [18-Jul-2016 04:58:54 UTC] PHP Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/smallwo2/public_html/focal.buzz/wp-includes/wp-db.php on line 1520
    [18-Jul-2016 04:59:55 UTC] PHP Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/smallwo2/public_html/focal.buzz/wp-includes/wp-db.php on line 1520
    [18-Jul-2016 05:00:46 UTC] PHP Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/smallwo2/public_html/focal.buzz/wp-includes/wp-db.php on line 1520
    [18-Jul-2016 05:00:46 UTC] PHP Notice: Undefined index: whmcsportal in /home/smallwo2/public_html/focal.buzz/wp-content/plugins/whmcs-wordpress-integration/includes/class-whmcs-wordpress-integration.php on line 1039
    [18-Jul-2016 05:00:46 UTC] PHP Notice: Undefined index: whmcsportal in /home/smallwo2/public_html/focal.buzz/wp-content/plugins/whmcs-wordpress-integration/includes/class-whmcs-wordpress-integration.php on line 1040
    [18-Jul-2016 05:00:47 UTC] PHP Notice: Undefined property: WP_Http_WHMCS_Curl::$headers in /home/smallwo2/public_html/focal.buzz/wp-content/plugins/whmcs-wordpress-integration/includes/http/class-whmcs-http-curl.php on line 261
    [18-Jul-2016 05:00:47 UTC] PHP Notice: Undefined property: WP_Http_WHMCS_Curl::$body in /home/smallwo2/public_html/focal.buzz/wp-content/plugins/whmcs-wordpress-integration/includes/http/class-whmcs-http-curl.php on line 286
    [18-Jul-2016 05:00:47 UTC] PHP Notice: Undefined property: WP_Http_WHMCS_Curl::$bytes_written_total in /home/smallwo2/public_html/focal.buzz/wp-content/plugins/whmcs-wordpress-integration/includes/http/class-whmcs-http-curl.php on line 290

  • Adam Czajczyk

    Hello Rob!

    Thank you for sharing the debug.log with me. I noticed that there are some errors related directly to the plugin and after another brief examination of plugin's code I think those may be confirming my previous suspicion.

    To make sure of it though and to find a solution I'll need some help so I already contacted one of our developers who's well familiar with WHMCS WordPress Integration plugin and he'll check it. Please note that his response may be a little bit slower than mine here on support forum as he deals with a lot of complex issues on daily basis.

    I will however update this thread as soon as I get a replay from him (unless he does it himself) so please keep an eye on it.

    Best regards,
    Adam

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.