Home › Forums › Basel support forum › Urgent issue with theme, sidebar and products name
Urgent issue with theme, sidebar and products name
- This topic has 61 replies, 2 voices, and was last updated 7 years ago by Artem Temos.
-
AuthorPosts
-
December 9, 2017 at 9:47 am #27981
GiulioParticipantHi 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.
December 9, 2017 at 9:51 am #27982
GiulioParticipantToday I’m trying to check if happen the same thing also if I’m logged off from WordPress.
December 9, 2017 at 10:23 am #27984
Artem TemosKeymasterHi,
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
December 9, 2017 at 11:45 am #27991
GiulioParticipantDone. After this a product changed in “Blog”. How can I verify that the issue will not repeat?
December 9, 2017 at 1:36 pm #28007
Artem TemosKeymasterJust wait some time and check. We can’t say how to reproduce it again since you didn’t make any extra steps initially too.
December 9, 2017 at 1:42 pm #28013
GiulioParticipantOk, thanks. I’ll wait 48 hours.
December 9, 2017 at 1:43 pm #28015
Artem TemosKeymasterOK, contact us if you have any additional questions or concerns.
December 9, 2017 at 3:55 pm #28039
GiulioParticipantI 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.
December 9, 2017 at 10:21 pm #28101
GiulioParticipantOMG, I found 2 products without names. Please HELP!
December 10, 2017 at 10:21 am #28123
GiulioParticipantAnother product without name this morning.
December 10, 2017 at 10:51 am #28125
GiulioParticipantTake a look to the screenshot please.
December 10, 2017 at 11:59 am #28150
Artem TemosKeymasterSorry, 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.
December 10, 2017 at 12:11 pm #28156
GiulioParticipantWe 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.
December 10, 2017 at 12:19 pm #28164
Artem TemosKeymasterBut 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.
December 10, 2017 at 12:24 pm #28165
GiulioParticipantI 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?
December 10, 2017 at 12:43 pm #28174
Artem TemosKeymasterWe would be really glad to help you, but our theme can’t rename products without any actions from your side.
December 10, 2017 at 12:47 pm #28177
GiulioParticipantYour 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?
December 10, 2017 at 12:51 pm #28180
Artem TemosKeymasterYes, 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.
December 10, 2017 at 12:57 pm #28187
GiulioParticipantOk, 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.
December 10, 2017 at 12:59 pm #28190
Artem TemosKeymasterFirstly, 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.
December 10, 2017 at 1:06 pm #28192
GiulioParticipantThank 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.
December 10, 2017 at 6:39 pm #28218
Artem TemosKeymasterFirstly, we suggest you to clone it to some development server and check how it will work without additional plugins installed.
December 10, 2017 at 8:23 pm #28251
GiulioParticipantI 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
December 11, 2017 at 7:46 am #28290
Artem TemosKeymasterHi,
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
December 11, 2017 at 9:33 am #28314
GiulioParticipantPlease could you check if that lines can envolve the products names? My Basel is 3.6.2
December 11, 2017 at 9:35 am #28315
Artem TemosKeymasterCould you please paste these lines here since we can a have a bit different code in our files?
December 11, 2017 at 10:13 am #28326
GiulioParticipantTemplate-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?
December 11, 2017 at 10:33 am #28332
Artem TemosKeymasterNo, there is nothing in this code related to products name changing.
December 11, 2017 at 10:48 am #28336
GiulioParticipantI understood. It is possible to fix easily that issues?
December 11, 2017 at 12:26 pm #28348
Artem TemosKeymasterWe can do this if you will provide us your FTP access and the access to those logs.
-
AuthorPosts
- You must be logged in to create new topics. Login / Register