• Resolved flyfisher842

    (@flyfisher842)


    this was a problem on 4.5 too
    I exported the custom code so I could remove it all as part of the testing on the fatal error logging tests see other post

    Both times I have tried this procedure on import this message comes up. And all I did was export and import.

    Error: The cc-master.txt file MUST contain all of the BEGIN and END placeholder lines of code even if they are blank/do not have any custom code. Create a new Custom Code Export file and manually add/edit your additional custom code, BUT leave all of the BEGIN and END comment placeholder lines of code in the new cc-master.txt file that you Export.

    https://ww.wp.xz.cn/plugins/bulletproof-security/

Viewing 15 replies - 1 through 15 (of 17 total)
  • Plugin Author AITpro

    (@aitpro)

    Ok I will text Custom Code Export and Import and see if I see this problem.

    Plugin Author AITpro

    (@aitpro)

    Test Results:
    Export works fine without any issues/problems/errors.
    Custom Code was exported successfully. Click the Download Zip Export button to download the Custom Code cc-master.zip file.

    Import works fine without any issues/problems/errors.
    Zip File Upload Successful.
    Zip File Exraction Successful. Method: ZipArchive class.
    Root Custom Code Import Successful.
    wp-admin Custom Code Import Successful.

    Are you editing any files? The zip file? The text file? Anything? Are you uploading the correct zip file?

    Thread Starter flyfisher842

    (@flyfisher842)

    all i did was export the custom code. delete it all off the root custom code blocks save the custom code.

    Run my tests

    try to reimport my file which resulted in the error msg.

    ################### cc-master.txt file manual editing help info ###################
    # Do NOT edit/change or delete any of the BEGIN and END placeholder lines of code.
    # Do NOT change the order of the BEGIN and END lines of code.
    # You can add/edit/change any code in-between the BEGIN and END lines of code.
    # After editing this file you will need to create a new cc-master.zip file.
    # The zip file MUST be named cc-master.zip in order to Import it to Custom Code.
    ###################################################################################
    
    ##################### Root htaccess File Custom Code #####################
    
    ##### BEGIN CUSTOM CODE WP-ADMIN/INCLUDES #####
    
    ##### END CUSTOM CODE WP-ADMIN/INCLUDES #####
    
    ##### BEGIN CUSTOM CODE BPSQSE BPS QUERY STRING EXPLOITS #####
    
    ##### END CUSTOM CODE BPSQSE BPS QUERY STRING EXPLOITS #####
    
    ##### BEGIN CUSTOM CODE DENY ACCESS TO PROTECTED SERVER FILES AND FOLDERS #####
    
    ##### END CUSTOM CODE DENY ACCESS TO PROTECTED SERVER FILES AND FOLDERS #####
    
    ##### BEGIN CUSTOM CODE DENY BROWSER ACCESS TO THESE FILES #####
    
    ##### END CUSTOM CODE DENY BROWSER ACCESS TO THESE FILES #####
    
    ##### BEGIN CUSTOM CODE DO NOT SHOW DIRECTORY LISTING/DIRECTORY INDEX #####
    
    ##### END CUSTOM CODE DO NOT SHOW DIRECTORY LISTING/DIRECTORY INDEX #####
    
    ##### BEGIN CUSTOM CODE ERROR LOGGING AND TRACKING #####
    
    ##### END CUSTOM CODE ERROR LOGGING AND TRACKING #####

    This has been at the top of the files I exported today. Looks to me like some of those belong down in the code as beginning or endings

    Plugin Author AITpro

    (@aitpro)

    The order is sorted using ksort so that DB options match the correct order and not in the order that you see in BPS Custom Code. DB options may not be saved in the same order due to years of DB option changes so ksort needs to be used to ensure an exact DB option array match. Not sure what to tell you? Maybe this has to do with a Browser problem or something installed on your computer? Not really sure?

    Thread Starter flyfisher842

    (@flyfisher842)

    the only thing i did was look inside at the file but did not change anything nor save anything. I have never heard of looking in a zip file to change anything about it.

    Plugin Author AITpro

    (@aitpro)

    LOL! Actually I know exactly what to tell you. I just turned on WP_DEBUG and I see the same error. You are aware that WP_DEBUG should ONLY be used briefly during troubleshooting/debugging and then turned Off? You do not want to leave WP_DEBUG turned on all the time in your wp-config.php file – case in point – it breaks the Custom Code Import feature (and other random things), which it should do since WP is debugging and is not in Live Website Production mode.

    Thread Starter flyfisher842

    (@flyfisher842)

    I would assume when it says debug false that it is turned off.

    Define debug false and not true

    Plugin Author AITpro

    (@aitpro)

    Yep, you are correct. And as it turns out WP_DEBUG does not cause this problem: https://ww.wp.xz.cn/support/topic/xmlrpcthemecompat-if-mod-and-wp-login-and-cpanel?replies=26#post-8338473 I just did a dumb mistake during testing between several different test sites. So Custom Code Import works for me with WP_DEBUG turned on or off. Back to square for you unfortunately. Double check that you are importing the correct zip file because that is exactly the dumb mistake that I made.

    Plugin Author AITpro

    (@aitpro)

    When you had BPS Pro installed on this site did you do a normal plugin deactivation and uninstallation of BPS Pro on the WordPress Plugins page? If not, and you only did a manual uninstall by deleting the /bulletproof-security/ plugin folder then you will have additional BPS Pro DB options that BPS free does not have. If that is what is happening then you will need to do a complete BPS free plugin uninstallation and reinstallation. https://ww.wp.xz.cn/plugins/bulletproof-security/installation/

    Thread Starter flyfisher842

    (@flyfisher842)

    i just checked another site and the same scramble was there. This is either a BPS issue or a server problem at my host. I am having the check to see if wo-debug is running on all my sites . And yes I Have imported the correct files back.
    ++++++++++++++++++
    Yes and I think I also deleted all the stuff related to bps pro

    Thread Starter flyfisher842

    (@flyfisher842)

    when I look at my dbs I see bps pro tables and I bet they should not say bps pro but just bps

    So I will probably have to do the complete uninstall and make sure the pro tables are not in the db before reinstalling free bps yes??

    Plugin Author AITpro

    (@aitpro)

    Well Custom Code Import works fine for me and no one else is reporting this problem so obviously the problem is something specific to your site/server.

    BPS and BPS Pro use the same database table names for uniformity/simplicity/sanity.

    Thread Starter flyfisher842

    (@flyfisher842)

    After export would going thru the boxes in custom code, select all and delete then save the empty code have destroyed something in the db that is needed on import.

    Plugin Author AITpro

    (@aitpro)

    Nope. Custom Code Import does these things: uploads and extracts the cc-master.zip file and updates all Custom Code DB options in your database from the extracted cc-master.txt file. Export, Import and Delete are all separate functions/actions that do not affect each other.

    Thread Starter flyfisher842

    (@flyfisher842)

    I think this is the problem and it is my bad. I run php.ini with file uploads off for added security. Then turn it on as needed. I forgot to turn it on and the import is a file uploade. My apologies. Been awhile since I did uploads.

Viewing 15 replies - 1 through 15 (of 17 total)

The topic ‘custom code export / import error’ is closed to new replies.