BPS Pro Compatibility with classicpress?

Home Forums BulletProof Security Pro BPS Pro Compatibility with classicpress?

Viewing 15 posts - 1 through 15 (of 18 total)
  • Author
    Posts
  • #36728
    robf
    Participant

    Will BPS Pro work with and be supporting the newly released WordPress fork of WP v4.9.8, ClassicPress?

    More info at https://classicpress.net

    I’m considering it as an option as it seems to be a responsible and community led fork, and I am concerned at the direction WP is taking (new and very unpopular Gutenberg editor, and development seemingly geared to wordpress.com at the expense of the wider community).

    I’d be loath to have to abandon BPS Pro though as it does a great job

    #36729
    AITpro Admin
    Keymaster

    I searched this forum and did not find any known issues or problems between BPS and the ClassicPress Theme.  There are only 2 known Themes that are not compatible with BPS > JobRoller Theme and the Auction Theme > https://forum.ait-pro.com/forums/topic/bulletproof-security-pro-compatibility-check-upgrading-from-bps-free-to-bps-pro/

    #36730
    robf
    Participant

    Thanks for getting back to me.

    I’m referring to a fork of WordPress v4.9.8 called ClassicPress (as per link), not a theme.

    It looks like the team at https://classicpress.net intend to keep compatibility with WP v4.9.x, whereas it looks like with the move to Gutenberg and React a lot of existing plugins/themes will require serious adaptation as WP v5 evolves and I’m concerned that this will cause massive issues with my existing sites.

    I really just wanted to know if BPSpro is likely to work with the ClassicPress fork if it is compatible with WP 4.9.8 core code

    #36731
    AITpro Admin
    Keymaster

    I would assume that BPS Pro will work the same with ClassicPress, but if you run into any problems then let us know and we will figure out a solution.

    #36732
    robf
    Participant

    Many thanks for your willingness to look at this. It may be a while before I migrate one of my websites to ClassicPress, but I’ll certainly report back on how it goes as I suspect quite a lot of WordPress users will be considering doing the same.

    #36735
    robf
    Participant

    I’ve now migrated one of my sites to ClassicPress and can confirm that BPS Pro seems to work fine on it should anyone else be considering doing the same. Very helpful team over on the ClassicPress website.

    #36839
    robf
    Participant

    I now have 4 sites running ClassicPress and Bulletproof Security Pro on all of them.

    Earlier today I tried updating the plugin as usual via standard WP/CP “Update Plugins” and got error as below

    uk-2019-01-24-17-07-10-550

    (Update Failed: The package could not be installed. PCLZIP_ERR_BAD_FORMAT (-10) : Unable to find End of Central Dir Record signature)

    I subsequently used BPS Pro’s internal facility to update from zip file within itself and this worked fine, so not critical, but it would be good to establish whether the error via the standard update method could have been triggered by BPS Pro checking for WP core files or similar when performing update (all other plugins I use have updated fine on CP so far)?

    Worth noting that the standard update method worked fine on all my WP sites, and to test I also tried reverting a CP site that failed to update to WP, at which point the BPS update installed with no issues, and then switching back to CP (working fine), so it isn’t an issue with my web host’s setup (the error above can apparently be caused by server site issues)

    Alternatively/additionally perhaps BPS Pro is checking core files when doing an update. If this is the case, it would be useful to know where the error above might be triggered (I have also raised this issue on ClassicPress forums).

    If a plugin remains compatible with WP 4.9.x, it will also be compatible with version 1.x of ClassicPress. There is a handy condition that plugin authors can use:

    function_exists( 'classicpress_version' )
    

    Many thanks,

    Robf

    #36840
    AITpro Admin
    Keymaster

    These are the 2 most common things that cause that PclZip error:

    1. The zip file is corrupted – can’t be this because the zip file installed fine on your other sites.
    2. Hosting disk space is close to being maxed out or is maxed out and the zip file cannot be extracted successfully.  Check your disk space quota in your web host control panel and see if that could be the problem.

    I guess it could also be an intermittent or temporary error.  Did you try to update BPS Pro more than once on that particular site?

    #36841
    robf
    Participant

    Thank you, as you say, zip file is fine.

    Definitely  not lack of disk space for same reason – installs fine on other sites running WP – fails on CP, but only when updated direct via plugin update (works fine using the upload zip option within BPSpro itself both on WP and CP).

    Yes, several attempts to update via plugin updates, all failing on CP (but works when site switched back to WP). Getting issue both on sites running PHP5.6 and on 7.2

    Could the update and/or install code in the plugin reference WP core code and throw this error? I’m also exploring this with ClassicPress support.

    Will check back tomorrow as suppertime in the UK!

    #36842
    AITpro Admin
    Keymaster

    Oh ok so it is happening on more than 1 ClassicPress site then?  PclZip is built into WP/CP and the error message is coming from PclZip. So either CP is doing something differently with PclZip than WP or maybe another plugin that you have installed is interfering with BPS/PclZip (not likely, but easy to eliminate by deactivating all other plugins).  Or there is some other random issue going on.  I’ve been meaning to install a test ClassicPress site Locally for testing. So I will get to that either today or tomorrow.  If I can reproduce the PclZip error then I can figure out the cause of the error. 😉  Ask the ClassicPress folks if they have modified PclZip in WP in any way.

    #36843
    robf
    Participant

    Yes, fails to update on 4 different sites running ClassicPress (1 left on BPSpro13.7 to test further, 2 since fixed by reverting to WP then switching back to CP, 1 since updated with no issues using alternative method for handling zip uploads from within BPSpro).

    I figured it was a PCLzip issue too (at least with ClassicPress), Their support say they haven’t modified PclZip in WP in any way, but did provide this in case it helps:

    “ClassicPress did make a change to the way plugins are downloaded from WordPress.org. This could only be an issue if your hosting company’s servers are subtly broken and they do not support making outbound requests to https://wordpress.org .”

    Not sure if this would affect your code, but I’m sure my web host supports that outbound request as other plugins updating fine.

    Great to hear you’ll be testing using ClassicPress. That is very much appreciated, thank you.

    #36852
    robf
    Participant

    One of the ClassicPress developers has been looking into this issue and has worked out what is going on.

    Here’s the info he’s given me, hopefully this will be helpful for resolving compatibility with ClassicPress, I’ve left the affected site on BPSpro 13.7 so I can test upgrade works once a fix for this issue is in place :

    this issue didn’t end up being quite what I thought it was, but here are the details:

    BPS Pro overrides the WordPress and ClassicPress plugin upgrade routines to provide a plugin zip file from the BPS servers instead of the WP.org servers. The problem is because of this custom implementation, and the developer of BPS should be able to fix it on his server pretty easily.

    More specifically: Please tell the developer of BPS Pro that he needs to whitelist the User-Agent header pattern for ClassicPress on his server. Currently his server is blocking the request because this header isn’t recognized, which is causing the download to redirect to an HTML page. This is of course not a valid zip file, hence the cryptic PCL_ZIP error.

    WordPress sends requests to other servers with a header like this:

    User-Agent: WordPress/4.9.9; https://example.org
    

    ClassicPress sends requests to other servers with a header like this:

    User-Agent: ClassicPress/4.9.9; https://example.org
    

    Note we may change this version string to reflect the ClassicPress version in the future, like ClassicPress/1.0.0.

    I would recommend leaving BPS Pro at v13.7 until the developer gets back to you, and then trying the upgrade so you can confirm that it’s fixed.

    Still, if you do want to go ahead and allow the upgrade, you can temporarily put the following code snippet in e.g.

    wp-content/mu-plugins/bps-temp-fix.php:

    <?php
    
    add_filter( 'http_headers_useragent', function( $ua ) {
        return 'WordPress/' . get_bloginfo( 'version' ) . '; ' . get_bloginfo( 'url' );
    } );
    
    
    #36853
    AITpro Admin
    Keymaster

    Ok yeah that makes sense since our API server has security measures in place to ONLY allow a wordpress.zip file from wordpress.org to prevent a malicious zip file from being installed from a different remote server location other than wordpress.org.  There may be other problems as well due to how our API server interacts with the ClassicPress API server.  I should be able to find some spare time to work on this in the next few days.  In the meantime you can continue to use the alternative manual BPS Pro upgrade method for any other websites that have ClassicPress installed on them > https://forum.ait-pro.com/forums/topic/bulletproof-security-pro-bps-pro-upgrade-installation-methods/

    #36854
    robf
    Participant

    Excellent, many thanks, and much appreciated.

    #36855
    James Nylen
    Participant

    Ok yeah that makes sense since our API server has security measures in place to ONLY allow a wordpress.zip file from wordpress.org to prevent a malicious zip file from being installed from a different remote server location other than wordpress.org.

    Hi, lead developer of ClassicPress here.  I just wanted to confirm/clarify that this particular issue is not related to the wordpress.zip update files.  Instead, the site is unable to download the updated version of BPS Pro itself, because this request goes to the BPS servers which are blocking/redirecting the request based on the User-Agent header sent by ClassicPress.

    Happy to help further, if there is anything else we can do then please let me know.

Viewing 15 posts - 1 through 15 (of 18 total)
  • You must be logged in to reply to this topic.