Home Forums Basel support forum Urgent issue with theme, sidebar and products name

Urgent issue with theme, sidebar and products name

Viewing 30 posts - 1 through 30 (of 62 total)
  • Author
    Posts
  • #27981

    Giulio
    Participant

    Hi there, since about one month I have an issue with some products names. They change automatically their name in a sidebar name. First was “Twitter”, then when I deleted this sidebar, became “Blog”, another sidebar. Every time After that it happen I need to edit to insert the original name. I already contacted WooCommerce support, WPML support and WP Fastest Cache support, but no-one helps me. My last hope is ask to you. Many thanks.

    #27982

    Giulio
    Participant

    Today I’m trying to check if happen the same thing also if I’m logged off from WordPress.

    #27984

    Artem Temos
    Keymaster

    Hi,

    Try to replace the code in the file inc / theme-setup.php

    				$custom_sidebars = new WP_Query( array('post_type' => 'basel_sidebar', 'post_status'=>'publish' ) );
    
    				if ( $custom_sidebars->have_posts() ) { 
    
    					while ( $custom_sidebars->have_posts() ) {
    
    						$custom_sidebars->the_post();
    						
    						register_sidebar( 
    							array(
    								'name'          => get_the_title(),
    								'id'            => 'sidebar-' . get_the_ID(),
    								'description'   => '',
    								'class'         => '',
    								'before_widget' => '<div id="%1$s" class="sidebar-widget %2$s">',
    								'after_widget'  => '</div>',
    								'before_title'  => '<h5 class="widget-title">',
    								'after_title'   => '</h5>'
    							)
    						);
    					}
    
    					wp_reset_postdata(); 
    				}

    to this one

    $custom_sidebars = get_posts( array('post_type' => 'basel_sidebar', 'post_status'=>'publish') );
    				
    				foreach ( $custom_sidebars as $sidebar ) {
    					register_sidebar( 
    						array(
    							'name'          => $sidebar->post_title,
    							'id'            => 'sidebar-' . $sidebar->ID,
    							'description'   => '',
    							'class'         => '',
    							'before_widget' => '<div id="%1$s" class="sidebar-widget %2$s">',
    							'after_widget'  => '</div>',
    							'before_title'  => '<h5 class="widget-title">',
    							'after_title'   => '</h5>'
    						)
    					);
    				}

    It should fix the issue.

    Regards

    #27991

    Giulio
    Participant

    Done. After this a product changed in “Blog”. How can I verify that the issue will not repeat?

    #28007

    Artem Temos
    Keymaster

    Just wait some time and check. We can’t say how to reproduce it again since you didn’t make any extra steps initially too.

    #28013

    Giulio
    Participant

    Ok, thanks. I’ll wait 48 hours.

    #28015

    Artem Temos
    Keymaster

    OK, contact us if you have any additional questions or concerns.

    #28039

    Giulio
    Participant

    I spent a lot of time (also WooCommerce support) searching the cause of this issue. At the begin we do not understood that “Twitter” was the sidebar name. So which was the issue? I really hope that it fixed.

    #28101

    Giulio
    Participant

    OMG, I found 2 products without names. Please HELP!

    #28123

    Giulio
    Participant

    Another product without name this morning.

    #28125

    Giulio
    Participant

    Take a look to the screenshot please.

    #28150

    Artem Temos
    Keymaster

    Sorry, but this issue seems to be no more related to our theme. There is some issue with your WordPress installation but it can’t be caused by our theme.

    #28156

    Giulio
    Participant

    We never edited WordPress code or your theme, so I really do not understand how could be caused by WordPress installation. All worked great until last update of WordPress and your theme as asked here: https://xtemos.com/forums/topic/woocommerce-update/. I just asked this to avoid issues and you told me that there would be no problems.

    #28164

    Artem Temos
    Keymaster

    But it can’t be caused by our theme or by the update. You can simply check it reverting back the theme version and WooCommere if you want. It will work the same.

    #28165

    Giulio
    Participant

    I can’t reverting back theme and WooCommerce. I would to solve that issue. But I can’t if every support that I contact tell me that “it can’t be cause by us”. Can I ask you what are conditions because the bug work?

    #28174

    Artem Temos
    Keymaster

    We would be really glad to help you, but our theme can’t rename products without any actions from your side.

    #28177

    Giulio
    Participant

    Your theme renamed products until yesterday in a sidebar name. Do you remember? Ok, now it is not your theme, but for sure we’re not us to do it. I asked to you what are conditions because the bug works. The code that you asked me to insert is envolved for sure in this issue. Please could you answer me? What that code do with your theme?

    #28180

    Artem Temos
    Keymaster

    Yes, recently it was renamed to the sidebar name, but again, it is renamed not by our theme. The problem with sidebars is a simple issue with that loop that overrides global WordPress loops in admin section sometimes. So the part of the code (maybe, we don’t know exactly) simply took the name of the sidebar because of the loop issue. And now the loop issue is solved and it uses an empty name since there is no post item in the loop.

    #28187

    Giulio
    Participant

    Ok, so I should ask to WooCommerce support? And what I should tell to they? At now it surely better than before however, so thank you. But I absolutely need to understand who I have to ask for that bug. Because Christmas is near and we can’t got these kind of issues with our E-Commerce.

    #28190

    Artem Temos
    Keymaster

    Firstly, we suggest you to understand when exactly this happens. Then, try to disable all additional plugins and check how it works with default WordPress theme. If you can’t do this on your current website then you will need to clone it to some development server. Sorry, but we don’t know who to ask since we can’t understand when it happens exactly.

    #28192

    Giulio
    Participant

    Thank you, but is about one month that we try to understand when it happen or with what kind of products it happen. They are always the same 5/6 products, always in default language version (the italian, not english). To understand when it happen we installed WP Cron, but it didn’t help us.

    #28218

    Artem Temos
    Keymaster

    Firstly, we suggest you to clone it to some development server and check how it will work without additional plugins installed.

    #28251

    Giulio
    Participant

    I got some PHP Notice in my debug log. Could interest the bug in your opinion?

    PHP Notice: Trying to get property of non-object in /web/htdocs/www.*************.com/home/wp-content/themes/basel/inc/classes/Swatches.php on line 115

    PHP Notice: Trying to get property of non-object in /web/htdocs/www.*************.com/home/wp-content/themes/basel/inc/template-tags.php on line 926

    PHP Notice: Undefined property: stdClass::$plugin in /web/htdocs/www.************.com/home/wp-content/plugins/woocommerce/includes/wc-core-functions.php on line 1839

    #28290

    Artem Temos
    Keymaster

    Hi,

    We can’t reproduce these errors on our side. But we don’t think that you need to worry about them since they are simple PHP notices. If you want, please, provide us your FTP access and the access to those logs and we will try to fix them.

    Thank you

    #28314

    Giulio
    Participant

    Please could you check if that lines can envolve the products names? My Basel is 3.6.2

    #28315

    Artem Temos
    Keymaster

    Could you please paste these lines here since we can a have a bit different code in our files?

    #28326

    Giulio
    Participant

    Template-tags: ` } elseif ( !is_single() && !is_page() && get_post_type() != ‘post’ && !is_404() ) {
    $post_type = get_post_type_object(get_post_type());
    echo $before . $post_type->labels->singular_name . $after;`
    Swatches: `if( ! function_exists( ‘basel_has_swatch’ ) ) {
    function basel_has_swatch($id, $attr_name, $value) {
    $swatches = array();

    $color = $image = ”;
    $term = get_term_by( ‘slug’, $value, $attr_name );
    $color = basel_tax_data( $attr_name, $term->term_id, ‘color’ );
    $image = basel_tax_data( $attr_name, $term->term_id, ‘image’ );
    $not_dropdown = basel_tax_data( $attr_name, $term->term_id, ‘not_dropdown’ );
    `

    The first could be envolved in the issue. Or not?

    #28332

    Artem Temos
    Keymaster

    No, there is nothing in this code related to products name changing.

    #28336

    Giulio
    Participant

    I understood. It is possible to fix easily that issues?

    #28348

    Artem Temos
    Keymaster

    We can do this if you will provide us your FTP access and the access to those logs.

Viewing 30 posts - 1 through 30 (of 62 total)