Forum Replies Created

Viewing 15 replies - 1 through 15 (of 22 total)
  • Thread Starter wookie.cc

    (@wookiecc)

    awesome, thank you!

    Thread Starter wookie.cc

    (@wookiecc)

    // BPS Global variables
    // 3.4: It is not a mistake or retarded to add the global keyword to global variables outside of functions per PHP.net, but yeah it does appear to be retarded.
    // WP_CLI requires that all global variables outside of functions MUST explicitly use the global keyword since WP_CLI loads WP within a function
    // and cannot access the global variables within functions in BPS. Luckily this does not break BPS or WordPress in any way and PHP.net states this is technically not an error.
    global $bps_last_version, $bps_version, $bps_footer, $aitpro_bullet, $bps_topDiv, $bps_bottomDiv, $bpsPro_remote_addr, $bpsPro_http_client_ip, $bpsPro_http_forwarded, $bpsPro_http_x_forwarded_for, $bpsPro_http_x_cluster_client_ip, $bps_wpcontent_dir, $bps_plugin_dir, $plugin_hashes, $theme_hashes;

    define( 'BULLETPROOF_VERSION', '7.01' );
    $bps_last_version = '6.9';
    $bps_version = '7.01';
    // $bps_footer = '<div id="AITpro-link">' . __('BulletProof Security ', 'bulletproof-security') . esc_html($bps_version) . __(' Plugin by ', 'bulletproof-security') . '<a href="'.esc_url('https://www.ait-pro.com/').'" target="_blank" title="AITpro Website Security">' . __( 'AITpro Website Security', 'bulletproof-security') . '</a></div>';
    $aitpro_bullet = '<img src="'.plugins_url('/bulletproof-security/admin/images/aitpro-bullet.png').'" style="padding:0px 3px 0px 3px;" />';
    // Top div & bottom div
    $bps_topDiv = '<div id="message" class="updated" style="background-color:#dfecf2;border:1px solid #999;-moz-border-radius-topleft:3px;-webkit-border-top-left-radius:3px;-khtml-border-top-left-radius:3px;border-top-left-radius:3px;-moz-border-radius-topright:3px;-webkit-border-top-right-radius:3px;-khtml-border-top-right-radius:3px;border-top-right-radius:3px;-webkit-box-shadow: 3px 3px 5px -1px rgba(153,153,153,0.7);-moz-box-shadow: 3px 3px 5px -1px rgba(153,153,153,0.7);box-shadow: 3px 3px 5px -1px rgba(153,153,153,0.7);"><p>';
    $bps_bottomDiv = '</p></div>';
    $bps_wpcontent_dir = str_replace( ABSPATH, '', WP_CONTENT_DIR );
    $bps_plugin_dir = str_replace( ABSPATH, '', WP_PLUGIN_DIR );

    // Setup Wizard Options: GDPR Compliance Global Variables
    $GDPR_Options = get_option('bulletproof_security_options_gdpr');

    if ( isset( $GDPR_Options['bps_gdpr_on_off'] ) && $GDPR_Options['bps_gdpr_on_off'] != 'On' ) {

    $bpsPro_remote_addr = false;
    if ( array_key_exists('REMOTE_ADDR', $_SERVER) ) {
    $bpsPro_remote_addr = $_SERVER['REMOTE_ADDR'];
    }
    $bpsPro_http_client_ip = false;
    if ( array_key_exists('HTTP_CLIENT_IP', $_SERVER) ) {
    $bpsPro_http_client_ip = $_SERVER['HTTP_CLIENT_IP'];
    }
    $bpsPro_http_forwarded = false;
    if ( array_key_exists('HTTP_FORWARDED', $_SERVER) ) {
    $bpsPro_http_forwarded = $_SERVER['HTTP_FORWARDED'];
    }
    $bpsPro_http_x_forwarded_for = false;
    if ( array_key_exists('HTTP_X_FORWARDED_FOR', $_SERVER) ) {
    $bpsPro_http_x_forwarded_for = $_SERVER['HTTP_X_FORWARDED_FOR'];
    }
    $bpsPro_http_x_cluster_client_ip = false;
    if ( array_key_exists('HTTP_X_CLUSTER_CLIENT_IP', $_SERVER) ) {
    $bpsPro_http_x_cluster_client_ip = $_SERVER['HTTP_X_CLUSTER_CLIENT_IP'];
    }

    } else {

    $bpsPro_remote_addr = 'GDPR Compliance On';
    $bpsPro_http_client_ip = 'GDPR Compliance On';
    $bpsPro_http_forwarded = 'GDPR Compliance On';
    $bpsPro_http_x_forwarded_for = 'GDPR Compliance On';
    $bpsPro_http_x_cluster_client_ip = 'GDPR Compliance On';
    }

    // Load BPS Global class - not doing anything with this Class in BPS Free
    //require_once WP_PLUGIN_DIR . '/bulletproof-security/includes/class.php';

    add_action( 'init', 'bulletproof_security_load_plugin_textdomain' );

    // Load i18n Language Translation
    function bulletproof_security_load_plugin_textdomain() {
    load_plugin_textdomain('bulletproof-security', false, dirname(plugin_basename(__FILE__)).'/languages/');
    }

    // Set BPS footer text after textdomain has been loaded.
    add_action( 'init', 'bulletproof_security_init_footer_text', 11 );

    function bulletproof_security_init_footer_text() {
    global $bps_footer, $bps_version;

    $bps_footer = '<div id="AITpro-link">'
    . __('BulletProof Security ', 'bulletproof-security')
    . esc_html( $bps_version )
    . __(' Plugin by ', 'bulletproof-security')
    . '<a href="' . esc_url( 'https://www.ait-pro.com/' ) . '" target="_blank" title="AITpro Website Security">'
    . __( 'AITpro Website Security', 'bulletproof-security' )
    . '</a></div>';
    }

    this worked for me

    Thread Starter wookie.cc

    (@wookiecc)

    Hello Ed,

    thank you for the reply.

    I have tracked down the _load_textdomain_just_in_time notice to a specific line in your main plugin file.

    In bulletproof-security.php, line 39, the plugin calls the translation functions __() directly in the global scope:

    $bps_footer = '<div id="AITpro-link">' . __('BulletProof Security ', 'bulletproof-security') . esc_html($bps_version) . __(' Plugin by ', 'bulletproof-security') . '<a href="'.esc_url('https://www.ait-pro.com/').'" target="_blank" title="AITpro Website Security">' . __( 'AITpro Website Security', 'bulletproof-security') . '</a></div>';

    This line calls the translation functions __() before WordPress has reached the init hook and before bulletproof_security_load_plugin_textdomain() runs:

    add_action( 'init', 'bulletproof_security_load_plugin_textdomain' );
    function bulletproof_security_load_plugin_textdomain() {
    load_plugin_textdomain('bulletproof-security', false, dirname(plugin_basename(__FILE__)).'/languages/');
    }

    Since WordPress 6.7 this results in _load_textdomain_just_in_time being triggered β€œtoo early” for the bulletproof-security domain, which causes the _doing_it_wrong() notice I’m seeing.

    A fix would be to move the $bps_footer assignment into a function hooked to init (or later), or otherwise ensure that the textdomain is fully loaded before any __() calls are made in the global scope.

    I surely can switch off wp_debug but since I work on other things every day, this is not an option πŸ™‚

    Thread Starter wookie.cc

    (@wookiecc)

    deactivate the plugin, delete and re-install solved the problem!

    Thread Starter wookie.cc

    (@wookiecc)

    Hello Jarno,

    I just had to enable Consent Mode in Google Site Kit.

    Thanks for the answer. Its done.

    Best regards
    Gunther

    Thread Starter wookie.cc

    (@wookiecc)

    I already did that. Thank you for the investigation!

    Thread Starter wookie.cc

    (@wookiecc)

    Thread Starter wookie.cc

    (@wookiecc)

    Found it in the class-semrushswa-metabox.php – is this the way to go?

    same here. went back to previous version

    Thread Starter wookie.cc

    (@wookiecc)

    Hello. The issue is still unsolved but it’s definitly a hosting / server problem.

    Thank you!

    Thread Starter wookie.cc

    (@wookiecc)

    Hello! I just tried the database and a different backup directory. the temporary zip file was created but then process hangs again at:

    [11-Nov-2021 10:52:42] Added database dump "XXX.sql" with 163,26 MB to backup file list
    [11-Nov-2021 10:52:42] Database backup done!
    [11-Nov-2021 10:52:42] 1. Trying to make a list of folders to back up …
    [11-Nov-2021 10:52:43] Added "wp-config.php" to backup file list
    [11-Nov-2021 10:52:43] 2520 folders to backup.
    [11-Nov-2021 10:52:43] 1. Trying to generate a file with installed plugin names …
    [11-Nov-2021 10:52:43] Added plugin list file "XXX.pluginlist.2021-11-11.txt" with 2,98 KB to backup file list.
    [11-Nov-2021 10:52:43] 1. Trying to generate a manifest file …
    [11-Nov-2021 10:52:43] Added manifest.json file with 4,39 KB to backup file list.
    [11-Nov-2021 10:52:43] 1. Trying to create backup archive …
    [11-Nov-2021 10:52:43] Compressing files as ZipArchive. Please be patient, this may take a moment.
    [11-Nov-2021 10:52:43] Adding Extra files to Archive
    [11-Nov-2021 10:52:43] Archiving Folder: /XXX/htdocs/hardly-listening.com/

    the site is hosted by ionos 1&1 where I do support for some other websites. the other backups work fine without any issues. I suppose its not the hoster. It seems its zip file creation, which somehoe does not work.

    Thank you so much for any ideas!

    Thread Starter wookie.cc

    (@wookiecc)

    Hello and thank you for your reply! I created a new backup job and excluded those directories but it still hangs like this:

    [10-Nov-2021 12:16:11] Added manifest.json file with 4,39 KB to backup file list.
    [10-Nov-2021 12:16:11] 1. Trying to create backup archive …
    [10-Nov-2021 12:16:11] Compressing files as ZipArchive. Please be patient, this may take a moment.
    [10-Nov-2021 12:16:11] Adding Extra files to Archive
    [10-Nov-2021 12:16:11] Archiving Folder: /XX/htdocs/hardly-listening.com/
    [10-Nov-2021 12:21:17] WARNING: Job restarts due to inactivity for more than 5 minutes.
    [10-Nov-2021 12:21:17] 1. Trying to create backup archive …
    [10-Nov-2021 12:21:17] Compressing files as ZipArchive. Please be patient, this may take a moment.
    [10-Nov-2021 12:21:17] Adding Extra files to Archive
    [10-Nov-2021 12:21:17] Archiving Folder: /XX/htdocs/hardly-listening.com/
    [10-Nov-2021 12:26:18] WARNING: Job restarts due to inactivity for more than 5 minutes.

    Could that have another reason?

    Thread Starter wookie.cc

    (@wookiecc)

    Hello @webtoffee

    That’s awesome. Thank you!

    Thread Starter wookie.cc

    (@wookiecc)

    Hello,

    thank you for your reply. We dont have any problem providing that information. We would like to provide that at least in german language / language of the website and I think that would be also the intention of stripe.

    I didn’t find that string in class-stripe-sepa-pay.php on line 52 with loco translate and I couldn’t overwrite it here /wp-admin/admin.php?page=wc-settings&tab=checkout&section=eh_sepa_stripe

    Maybe we find a good solution to provide that information in german. Thank you!

    Thread Starter wookie.cc

    (@wookiecc)

    yes. I cleared all cache. Still the same. Somehow it does not overwrite the text. It only happens for sepa pay. all other payment descriptions got updated correctly.

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