Jump to content

Remove Blank/empty Tags


Recommended Posts

pls check your admin panel.

 

Main Menu -> Catalog -> Tags. If there are any left blank then delete it.

As I already said that I tried to find the empty tags in BO (Catalog > Tags) and I could not find any empty tags

Link to comment
Share on other sites

  • 2 months later...

I am also having this problem and can't solve it. 

 

archSandy could you be more specific about the render file? Thank you

Check tpl file in this folder .

File name should be blocktags.tpl

default-prestashop is the theme name.  So you can change as per your theme.

 

prestashop\themes\default-bootstrap\modules\blocktags

 

Open the file  in one of the text editor.

{foreach from=$tags item=tag name=myLoop}
	<a 
	class="{$tag.class} {if $smarty.foreach.myLoop.last}last_item{elseif $smarty.foreach.myLoop.first}first_item{else}item{/if}"
	href="{$link->getPageLink('search', true, NULL, "tag={$tag.name|urlencode}")|escape:'html':'UTF-8'}" 
	title="{l s='More about' mod='blocktags'} {$tag.name|escape:'html':'UTF-8'}" 
	>
	{$tag.name|escape:'html':'UTF-8'}
	</a>
{/foreach}

Find upper code and Replace code with follows:

{foreach from=$tags item=tag name=myLoop}
{if isset( $tag.name ) && $tag.name != '' }
<a 
class="{$tag.class} {if $smarty.foreach.myLoop.last}last_item{elseif $smarty.foreach.myLoop.first}first_item{else}item{/if}"
href="{$link->getPageLink('search', true, NULL, "tag={$tag.name|urlencode}")|escape:'html':'UTF-8'}" 
title="{l s='More about' mod='blocktags'} {$tag.name|escape:'html':'UTF-8'}" 
>
	{$tag.name|escape:'html':'UTF-8'}
</a>
{/if}
{/foreach}

Clear cache folder and runs it.

 

thanks

  • Like 4
Link to comment
Share on other sites

  • 3 weeks later...

Hello, I have a similar problem.

I am installing a multistore and block labels appears only in a shop and the other not.

Main store: http://vidadecampo.com/tienda_prestashop/es/
Secondary store: http://comidaperrospiensos.com/tienda_prestashop/es/

Actually in maintenance mode.

I have add products from all the shops and add tags to the products. I can see the tags in catalogue >> tags for both shops.

 

In secondary store shows me all tags most used, but in the main shop a 10 empty boxes are displayed and nothing else. 

Thank you for your help

 

 

post-1247671-0-15136200-1464107156_thumb.jpg

post-1247671-0-13421800-1464107158_thumb.jpg

Link to comment
Share on other sites

Thank you for your answer.

I think it´s a problem for multishop.

Forum said that they could be tags that had been removed and look for them in B.O. tag_count. I removed them but I noticed something.

If a add a product just for one shop, the tag is correct add, but if a add a product for all shops, the tag is add to the secondary shop only.

I have try to insert the tag most used in the secondary shop also in the first shop (B.O. tag_count) and it displays an error:

DUPLICATE INPUT for the PRIMARY key:

id_group-id_tag

It means that it is not using id_shop.

I don´t know if it has happened to more people because there is not a lot of documentation for multishop, especially in Spanish.

Thank you for your help

Link to comment
Share on other sites

Hello,

 

I have been cheking that and if I add a product in one shop context, the tag is correct add, but if I also activate the product for secondary shop, prestashop removes the tag from the primary shop and update it to the secondary shop. The correct would be to have tags for both shops.

 

My prestashop version is 1.6.1.4. It's my first instalattion and no update.

 

I do not understand what you mean with indexing. Indexing what?? How can we do this?

Thank you for your help.
 

Link to comment
Share on other sites

  • 2 weeks later...
  • 1 month later...

I have this same problem, i dont have multiple shops. I even removed all tags, cleared ps_product_tag but i still have empty tags. The code for hiding them works but it does not fix the problem. Really frustrating.

Are u using any thirdparty themes ?

 

Do clear cache folders.

Then check it new PRIVATE browser. 

Also verify that code should be properly put in the file ( theme_you_are_using/modules/blocktags/blocktags.tpl). Changes something in file for verification

Smarty SYNTAX should be accurate. 

Link to comment
Share on other sites

Just go through prestashop main directory,

Go cache folder.

Remove all the directory and files including class_index.php except index.php

 

If still not works then ask ur developer to provide theme_you_are_using/modules/blocktags/blocktags.tpl

 

Regards

This does not work, already tried.

 

The developer does include warehouse/modules/blocktags/blocktags.tpl

 

*tried again, still empty tags

Edited by denkbeter (see edit history)
Link to comment
Share on other sites

  • 1 year later...

Hi,

In my case, the problem was that there were records in the tag_count table for tag that do not exist.

My solution for PS 1.6:

     DELETE FROM ps_tag_count WHERE id_tag NOT IN (SELECT id_tag FROM ps_tag);

 

Regards

 

Link to comment
Share on other sites

  • 3 months later...
On 4/1/2018 at 6:58 PM, ticing said:

Hi,

In my case, the problem was that there were records in the tag_count table for tag that do not exist.

My solution for PS 1.6:

     DELETE FROM ps_tag_count WHERE id_tag NOT IN (SELECT id_tag FROM ps_tag);

 

Regards

 

any advices for PS 1.7.x ?

DB Tables have changed names as I can see.

Link to comment
Share on other sites

  • 11 months later...
On 1/4/2018 at 5:58 PM, ticing said:

Hi,

In my case, the problem was that there were records in the tag_count table for tag that do not exist.

My solution for PS 1.6:

     DELETE FROM ps_tag_count WHERE id_tag NOT IN (SELECT id_tag FROM ps_tag);

 

Regards

 

Well, what about ps_product_tag? 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...