Forum Replies Created

Viewing 8 replies - 1 through 8 (of 8 total)
  • Thread Starter bzadmin

    (@bzadmin)

    I actually *just* found the problem. It is a bad interaction with Currency Switcher for Woocommerce that is enqueueing a conflicting js into the analytics page to provide currency switching in reports. I’m going to engage with the developer to try to fix the error.

    Thanks,

    Thread Starter bzadmin

    (@bzadmin)

    Yes I saw on github! thanks for all the work you guys do ??

    Thread Starter bzadmin

    (@bzadmin)

    Oh.. as it happens it looks like this was a known issue and at one point the fix for it was commented out. Immediately after the insert line in Upgrade.php (#479) there’s this commented code:

    // TODO: Move meta deletion to ATUM settings -> Tools
    // If the row was inserted, delete the old meta.
    // phpcs:ignore Squiz.Commenting.BlockComment.NoNewLine
    /*if ( $inserted_row ) {
        foreach ( array_keys( $meta_keys_to_migrate ) as $meta_key ) {
            delete_post_meta( $product->ID, $meta_key );
        }
    }*/

    Uncommenting de if.. foreach fixes the problem and the install goes through correctly.

    Thread Starter bzadmin

    (@bzadmin)

    Any ideas of how to solve this? The previous message contains a repro. Thanks

    Thread Starter bzadmin

    (@bzadmin)

    Hi,
    The theme is in this link:
    https://flatsome3.uxthemes.com/
    a description of their UX Builder is this:
    https://flatsome3.uxthemes.com/features/ux-page-builder/

    But essentially what is happening is this:
    – The theme adds an “app” to edit the post, and it produces a link that ends up looking like this:
    https:/…/backend/post.php?post=79804&action=edit&app=uxbuilder&type=editor&v=3e8d115eb4b3#/

    Where backend is equivalent to wp-admin.

    You can reproduce this by adding this somewhere in a valid function.php of your theme or plugin:

    add_action( 'current_screen', function ( $screen ) {
        if ( $screen->base !== 'post' ) return; // not a post page
        if ( ! array_key_exists( 'apptest', $_GET ) ) return;
        if ( ! array_key_exists( 'type', $_GET ) ) return;
      
        // $post_types = get_ux_builder_post_types();
        // $post = ux_builder( 'editing-post' )->post();
      
        // Render template for registered post types only.
      do_action( 'admin_enqueue_scripts' );
    ?><!DOCTYPE html>
    <html>
    <head>
      <title>Test</title>
      <meta charset="<?php bloginfo( 'charset' ); ?>">
      <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
      <?php wp_print_styles( ) ?>
    </head>
    <body>  
      <?php wp_print_scripts(  ) ?>
    </body>
    </html>
    
    <?php    
    
      
          die;
      } );

    and call it with the following url
    /backend/post.php?post=79804&action=edit&apptest=uxbuilder&type=editor#/

    where the post id is valid, and backend is the string you use to substitute wp-admin

    the result should be looking something like this:

    <html><head><style></style></head><body>
      <title>Test</title>
      <meta charset="UTF-8">
      <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
      <style type="text/css">
    
    </style>
    	<link rel="stylesheet" id="dashicons-css" href="https://dev-server/wp-includes/css/dashicons.min.css?ver=5.3.2" media="all">
    <link rel="stylesheet" id="admin-bar-css" href="https://dev-server/wp-includes/css/admin-bar.min.css?ver=5.3.2" media="all">
    <link rel="stylesheet" id="query-monitor-css" href="https://dev-server/wp-content/plugins/query-monitor/assets/query-monitor.css?ver=1575950207" media="all">
    <link rel="stylesheet" id="wp-auth-check-css" href="https://dev-server/wp-includes/css/wp-auth-check.min.css?ver=5.3.2" media="all">
    <link rel="stylesheet" id="wp-block-library-css" href="https://dev-server/wp-includes/css/dist/block-library/style.min.css?ver=5.3.2" media="all">
    <link rel="stylesheet" id="wc-block-style-css" href="https://dev-server/wp-content/plugins/woocommerce/packages/woocommerce-blocks/build/style.css?ver=2.5.11" media="all">
    <link rel="stylesheet" id="wp-components-css" href="https://dev-server/wp-includes/css/dist/components/style.min.css?ver=5.3.2" media="all">
    <link rel="stylesheet" id="wp-editor-font-css" href="https://fonts.googleapis.com/css?family=Noto+Serif%3A400%2C400i%2C700%2C700i&ver=5.3.2" media="all">
    <link rel="stylesheet" id="wp-block-editor-css" href="https://dev-server/wp-includes/css/dist/block-editor/style.min.css?ver=5.3.2" media="all">
    <link rel="stylesheet" id="wp-nux-css" href="https://dev-server/wp-includes/css/dist/nux/style.min.css?ver=5.3.2" media="all">
    <link rel="stylesheet" id="wp-editor-css" href="https://dev-server/wp-includes/css/dist/editor/style.min.css?ver=5.3.2" media="all">
    <link rel="stylesheet" id="wp-block-library-theme-css" href="https://dev-server/wp-includes/css/dist/block-library/theme.min.css?ver=5.3.2" media="all">
    <link rel="stylesheet" id="wp-edit-blocks-css" href="https://dev-server/wp-includes/css/dist/block-library/editor.min.css?ver=5.3.2" media="all">
    <link rel="stylesheet" id="wc-block-editor-css" href="https://dev-server/wp-content/plugins/woocommerce/packages/woocommerce-blocks/build/editor.css?ver=2.5.11" media="all">
    <link rel="stylesheet" id="flatsome-gutenberg-css" href="https://dev-server/wp-content/themes/flatsome/inc/admin/gutenberg/assets/css/style.css?ver=1.0.1" media="all">
    <link rel="stylesheet" id="ux_shortcode_insert_css-css" href="https://dev-server/wp-content/themes/flatsome/inc/extensions/flatsome-shortcode-insert/style.css?ver=5.3.2" media="all">
    <link rel="stylesheet" id="flatsome-panel-css-css" href="https://dev-server/wp-content/themes/flatsome/inc/admin/panel/panel.css?ver=5.3.2" media="all">
    <link rel="stylesheet" id="custom-css-css" href="https://dev-server/wp-content/plugins/custom-template/custom/admin.css" media="all">
    
      
      <script src="https://dev-server/wp-includes/js/jquery/jquery.js?ver=1.12.4-wp"></script>
    <script src="https://dev-server/wp-includes/js/jquery/jquery-migrate.min.js?ver=1.4.1"></script>
    <script src="https://dev-server/wp-includes/js/jquery/ui/core.min.js?ver=1.11.4"></script>
    <script src="https://dev-server/wp-includes/js/jquery/ui/widget.min.js?ver=1.11.4"></script>
    <script src="https://dev-server/wp-includes/js/jquery/ui/mouse.min.js?ver=1.11.4"></script>
    <script src="https://dev-server/wp-includes/js/jquery/ui/sortable.min.js?ver=1.11.4"></script>
    <script src="https://dev-server/wp-includes/js/hoverIntent.min.js?ver=1.8.1"></script>
    <script src="https://dev-server/wp-includes/js/utils.min.js?ver=5.3.2"></script>
    <script src="https://dev-server/wp-admin/js/common.min.js?ver=5.3.2"></script>
    <script src="https://dev-server/wp-includes/js/hoverintent-js.min.js?ver=2.2.1"></script>
    <script src="https://dev-server/wp-includes/js/admin-bar.min.js?ver=5.3.2"></script>
    <script src="https://dev-server/wp-includes/js/dist/vendor/wp-polyfill.min.js?ver=7.4.4"></script>
    <script src="https://dev-server/wp-includes/js/dist/hooks.min.js?ver=2.6.0"></script>
    

    as you can see wp-includes, wp-admin etc are not being re-written by wp-hide.

    Thanks!

    Thread Starter bzadmin

    (@bzadmin)

    Perfect – now getting connection without errors. Thanks for the quick turnaround!

    If it helps anyone – I was faced with the same symptom of the problem. Stepping through the code it showed that is_connected_to_gs was trying to read a transient to read the connection. But since I was doing some development in a staging server with a copied database the transients were all bad. Running ‘wp transient delete-all’ in the wp cli fixed the issue.

    I had the same issue. Doing a bit of debugging locally I found that class-gs-client.php is catching exceptions thrown by the google php client. In my case it was this error:
    “Cannot use ACL API to set object policy when object policies are disabled”

    which i fixed by enabling the acl api on the bucket permissions page.

    It would be great if these errors are surfaced up the the wp admin page rather than silently catching them and marking the sync or other commands a success.

Viewing 8 replies - 1 through 8 (of 8 total)