Forum Replies Created

Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter tbaikamine

    (@tbaikamine)

    yes, deleted all and reinstalled everything. still no way to debug properly the cause. luckily I was on a staging site. so in case this happened again I will have to delete all of production site and lose everything. and also no way of deleting this topic.
    somehow basic things seems extremly impossible with wordpress

    Thread Starter tbaikamine

    (@tbaikamine)

    sharing what I discovered with the community:
    when you visit the customizer page for the first time you need to distinguish between the “controls pane” ready and the “previewer” ready
    parts of the “controls pane” still get updates AFTER the “previewer” fully loads
    (when the previewer is not fully loaded you can notice the tab title showing: Loading…)
    so to resolve the issue, I enqueued a previewer script to send a custom event when it’s fully loaded to the “controls pane” script.
    the previewer script:

    (function ($) {
      $(document).ready(function () {
        // sends a preview-ready custom event with no data
        wp.customize.preview.send("preview-ready", null);
      });
    })(jQuery);

    enqueued this way:

    add_action('customize_preview_init',function(){
     
     wp_enqueue_script('preview_script',get_stylesheet_directory_uri().'preview_script.js',array('customize-preview','jquery'),false,true);
    });

    the controls pane script:

    (function ($) {
      $(document).ready(function () {
        wp.customize.previewer.bind("preview-ready", function () {
          // your logic here
        });
      });
    })(jQuery);

    enqueued this way:

    add_action('customize_controls_enqueue_scripts',function(){
     
     wp_enqueue_script('controls_script',get_stylesheet_directory_uri().'control_script.js',array('customize-controls','jquery'),false,true);
    });

    hope this helps ??

    Thread Starter tbaikamine

    (@tbaikamine)

    you know what
    https://aminelab.com/woocommerce

    i will keep this test website for 24h
    it’s a fresh wordpress installation. ONLY woocommerce installed and activated alongside with storefront
    just visit the home page and look/pay close attention to first row
    then look again to the second row.

    pictures of all sizes will be coropped
    UNLESS ! if one of the dimensions (height OR width) is less than 230px (number can be different depending on your screen size)
    then the cropping is skipped for that product
    and the grid looks terrible.

    if you want to access the dashboard for whatever reason (to check if other plugins are installed. or you want to make sure it’s storefront or whatever)
    login: woocommerce
    password: woocommerce

    you can reproduce the same environement yourself and see the issue
    after I delete the test website.
    this will save you time instead of asking more questions.

    • This reply was modified 3 years, 8 months ago by tbaikamine.
    • This reply was modified 3 years, 8 months ago by tbaikamine.
    Thread Starter tbaikamine

    (@tbaikamine)

    
    ### WordPress Environment ###
    
    WordPress address (URL): https://localhost/wordpress
    Site address (URL): https://localhost/wordpress
    WC Version: 5.4.1
    REST API Version: ? 5.4.1
    WC Blocks Version: ? 5.1.0
    Action Scheduler Version: ? 3.1.6
    WC Admin Version: ? 2.3.1
    Log Directory Writable: ?
    WP Version: 5.7.2
    WP Multisite: –
    WP Memory Limit: 256 MB
    WP Debug Mode: –
    WP Cron: ?
    Language: en_GB
    External object cache: –
    
    ### Server Environment ###
    
    Server Info: Apache/2.4.41 (Win64) PHP/7.4.0
    PHP Version: 7.4.0
    PHP Post Max Size: 98 GB
    PHP Time Limit: 3600
    PHP Max Input Vars: 2500
    cURL Version: 7.67.0
    OpenSSL/1.1.1c
    
    SUHOSIN Installed: –
    MySQL Version: 5.7.28
    Max Upload Size: 98 GB
    Default Timezone is UTC: ?
    fsockopen/cURL: ?
    SoapClient: ?
    DOMDocument: ?
    GZip: ?
    Multibyte String: ?
    Remote Post: ?
    Remote Get: ?
    
    ### Database ###
    
    WC Database Version: 5.4.1
    WC Database Prefix: wp_
    Total Database Size: 1.21MB
    Database Data Size: 1.03MB
    Database Index Size: 0.18MB
    wp_woocommerce_sessions: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wp_woocommerce_api_keys: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wp_woocommerce_attribute_taxonomies: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wp_woocommerce_downloadable_product_permissions: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wp_woocommerce_order_items: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wp_woocommerce_order_itemmeta: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wp_woocommerce_tax_rates: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wp_woocommerce_tax_rate_locations: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wp_woocommerce_shipping_zones: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wp_woocommerce_shipping_zone_locations: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wp_woocommerce_shipping_zone_methods: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wp_woocommerce_payment_tokens: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wp_woocommerce_payment_tokenmeta: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wp_woocommerce_log: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wp_actionscheduler_actions: Data: 0.00MB + Index: 0.02MB + Engine MyISAM
    wp_actionscheduler_claims: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wp_actionscheduler_groups: Data: 0.00MB + Index: 0.01MB + Engine MyISAM
    wp_actionscheduler_logs: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wp_commentmeta: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wp_comments: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wp_links: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wp_options: Data: 0.91MB + Index: 0.04MB + Engine MyISAM
    wp_postmeta: Data: 0.08MB + Index: 0.03MB + Engine MyISAM
    wp_posts: Data: 0.03MB + Index: 0.02MB + Engine MyISAM
    wp_termmeta: Data: 0.00MB + Index: 0.01MB + Engine MyISAM
    wp_terms: Data: 0.00MB + Index: 0.01MB + Engine MyISAM
    wp_term_relationships: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wp_term_taxonomy: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wp_usermeta: Data: 0.00MB + Index: 0.01MB + Engine MyISAM
    wp_users: Data: 0.00MB + Index: 0.01MB + Engine MyISAM
    wp_wc_admin_notes: Data: 0.01MB + Index: 0.00MB + Engine MyISAM
    wp_wc_admin_note_actions: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wp_wc_category_lookup: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wp_wc_customer_lookup: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wp_wc_download_log: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wp_wc_order_coupon_lookup: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wp_wc_order_product_lookup: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wp_wc_order_stats: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wp_wc_order_tax_lookup: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wp_wc_product_meta_lookup: Data: 0.00MB + Index: 0.01MB + Engine MyISAM
    wp_wc_reserved_stock: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wp_wc_tax_rate_classes: Data: 0.00MB + Index: 0.01MB + Engine MyISAM
    wp_wc_webhooks: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    
    ### Post Type Counts ###
    
    attachment: 30
    customize_changeset: 7
    page: 7
    post: 1
    product: 29
    revision: 10
    
    ### Security ###
    
    Secure connection (HTTPS): ?
    					Your store is not using HTTPS. Learn more about HTTPS and SSL Certificates.
    Hide errors from visitors: ?
    
    ### Active Plugins (1) ###
    
    WooCommerce: by Automattic – 5.4.1
    
    ### Inactive Plugins (0) ###
    
    ### Settings ###
    
    API Enabled: –
    Force SSL: –
    Currency: USD ($)
    Currency Position: left
    Thousand Separator: ,
    Decimal Separator: .
    Number of Decimals: 2
    Taxonomies: Product Types: external (external)
    grouped (grouped)
    simple (simple)
    variable (variable)
    
    Taxonomies: Product Visibility: exclude-from-catalog (exclude-from-catalog)
    exclude-from-search (exclude-from-search)
    featured (featured)
    outofstock (outofstock)
    rated-1 (rated-1)
    rated-2 (rated-2)
    rated-3 (rated-3)
    rated-4 (rated-4)
    rated-5 (rated-5)
    
    Connected to WooCommerce.com: –
    
    ### WC Pages ###
    
    Shop base: #11 - /shop/
    Basket: #12 - /basket/
    Checkout: #13 - /checkout/
    My account: #14 - /my-account/
    Terms and conditions: ? Page not set
    
    ### Theme ###
    
    Name: storefront child
    Version: 1.0.0
    Author URL: https://linkedin.com/in/tbaik-amine
    Child Theme: ?
    Parent Theme Name: Storefront
    Parent Theme Version: 3.7.0
    Parent Theme Author URL: https://woocommerce.com/
    WooCommerce Support: ?
    
    ### Templates ###
    
    Overrides: –
    
    ### Action Scheduler ###
    
    Complete: 3
    Oldest: 2021-07-11 16:40:55 +0100
    Newest: 2021-07-12 12:21:46 +0100
    
    ### Status report information ###
    
    Generated at: 2021-07-12 21:29:17 +01:00
    
    Forum: Plugins
    In reply to: [Polylang] why on earth
    Thread Starter tbaikamine

    (@tbaikamine)

    the question is: how ?
    say I installed a plugin/theme and no one in our beautiful community already translated it.
    YOUR “Strings translations” admin submenu is UNCAPABLE of listing strings wrapped in __() or _e() functions in the so called plugin/theme
    so again: how ?
    after couple of hours doing research I found a plugin “Theme and plugin translation for Polylang (TTfP)” that fixes the faulty plugin of yours.
    now that we answered the “how”. this brings me back to the title of my question: WHY ?
    just why on earth something that is soo simple by nature
    we work so hard to make it complicated.
    I don’t want to waste more time trying to understand the need for pll_register_string()
    because am afraid once I discover that. it would be a silly reason and I will end up jumping from the window

    • This reply was modified 3 years, 10 months ago by tbaikamine.
    Thread Starter tbaikamine

    (@tbaikamine)

    You are right about the second part of your answer, i did overwrite the jQuery version (also tried to re-queu the heartbeat script and it didn’t work)
    When i work with the one wordpress provides, the heartbeat works also.
    It sucks to see wordpress uses version 1.12 while jQuery is now 3.5
    Really sucks big time ! Especially with a super slow plan to “safely” upgrade in 2 years

    However the frontend “keyword” is wrong. Because the heartbeat worked in the admin side
    So the keyword, be it with the importance it was giving, is sadly misleading and so wrong. So the documentation must change, in case “frontend” has that much significance.

    • This reply was modified 4 years, 5 months ago by tbaikamine.
    Thread Starter tbaikamine

    (@tbaikamine)

    found a working solution :
    since what makes difference between two user’s roles (administrator and a customer in our case)
    is the user’s capabilities !
    so after a lot of trials i found that the user really needs the “manage_options” capability to be able to use the function ! (strange)

    $user = new WP_User(get_current_user_id());
    $user->add_cap('manage_options');

    without the user’s being able to see the Administration panel
    this capability wont do any good for the user, and certainly no harm for the website
    but still, it’s a bug !

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