Page 1 of 1

New tag save failed

Posted: Fri Apr 26, 2013 5:50 pm
by JanKrohn
I upgraded from Joomla 3.0.3 to 3.1 seemingly very smoothly (no 3rd party plugins). I "discovered" the tags extensions, and cleared the cache afterwards. Tags are now showing up in the backend.

So I wanted to create the first tag. Upon pressing the save button I got
Error

Save failed with the following error: exception 'UnexpectedValueException' with message 'TagsTableTag::_getNode(1, ) failed.' in /home/vicfont/public_html/heidoc/joomla/libraries/joomla/table/nested.php:1441 Stack trace: #0 /home/vicfont/public_html/heidoc/joomla/libraries/joomla/table/nested.php(751): JTableNested->_getNode('1') #1 /home/vicfont/public_html/heidoc/joomla/administrator/components/com_tags/tables/tag.php(181): JTableNested->store(false) #2 /home/vicfont/public_html/heidoc/joomla/administrator/components/com_tags/models/tag.php(335): TagsTableTag->store() #3 /home/vicfont/public_html/heidoc/joomla/libraries/legacy/controller/form.php(691): TagsModelTag->save(Array) #4 /home/vicfont/public_html/heidoc/joomla/libraries/legacy/controller/legacy.php(722): JControllerForm->save() #5 /home/vicfont/public_html/heidoc/joomla/administrator/components/com_tags/tags.php(22): JControllerLegacy->execute('save') #6 /home/vicfont/public_html/heidoc/joomla/libraries/legacy/component/helper.php(359): require_once('/home/vicfont/p...') #7 /home/vicfont/public_html/heidoc/joomla/libraries/legacy/component/helper.php(339): JComponentHelper::executeComponent('/home/vicfont/p...') #8 /home/vicfont/public_html/heidoc/joomla/administrator/includes/application.php(166): JComponentHelper::renderComponent('com_tags') #9 /home/vicfont/public_html/heidoc/joomla/administrator/index.php(56): JAdministrator->dispatch() #10 {main}
Any ideas about this one?

Thanks,
Jan

Re: New tag save failed

Posted: Sat Apr 27, 2013 7:36 am
by mcsmom
You should not have to discover the tags extension, it should have installed automaically.
However you may have had a partial failure of the sql to run on install.

If you look at your database (you will need to go to your control panel and then use what they give you to manage the database, probably phpmyadmin) the tags table should have one row of data. If the tags table is empty go to the sql tab and paste the following:

INSERT INTO `#__tags` (`id`, `parent_id`, `lft`, `rgt`, `level`, `path`, `title`, `alias`, `note`, `description`, `published`, `checked_out`, `checked_out_time`, `access`, `params`, `metadesc`, `metakey`, `metadata`, `created_user_id`, `created_time`,`created_by_alias`, `modified_user_id`, `modified_time`, `images`, `urls`, `hits`, `language`, `version`)
VALUES (1, 0, 0, 1, 0, '', 'ROOT', 'root', '', '', 1, 0, '0000-00-00 00:00:00', 1, '{}', '', '', '', '', '2011-01-01 00:00:01','', 0, '0000-00-00 00:00:00', '', '', 0, '*', 1);


Click go.

Then tags should work.

Re: New tag save failed

Posted: Sat Apr 27, 2013 10:30 am
by JanKrohn
Yes, this was the solution. Thanks a lot!

Jan

Re: New tag save failed

Posted: Mon Apr 29, 2013 4:44 am
by JanKrohn
There still is something else missing.....

http://www.heidoc.net/joomla/component/ ... 2-software
An error has occurred while processing your request.

You may not be able to visit this page because of:
•an out-of-date bookmark/favourite
•a mistyped address
•a search engine that has an out-of-date listing for this site
•you have no access to this page
If difficulties persist, please contact the System Administrator of this site and report the error below.

0 SQL=SELECT * FROM `jos_content_types`
I guess there's some more db record missing, that has not been created by the upgrade script.
Do I have to insert any default record in jos_content_types?

Thanks,
Jan

Re: New tag save failed

Posted: Fri May 03, 2013 5:14 pm
by JanKrohn
After creating all the tags, I now want to assign them to contacts, articles etc.

I'm getting another SQL error:
Error

Save failed with the following error: SQL=SELECT ct.type_id FROM `jos_content_types` AS `ct` WHERE `ct`.`type_alias` = 'com_contact.contact'
Is there any way how to find out all the default records in these tables, so I don't have to ask here all the time? Preferably any other way besides installing a second blank Joomla...

Jan

Re: New tag save failed

Posted: Sat May 11, 2013 3:33 pm
by JanKrohn
Ok, solved. Two tables were missing from my installation: jos_content_types and jos_ucm_base. I exported them from a clen installation, and imported to my site. Seems to work.

Re: New tag save failed

Posted: Mon May 13, 2013 8:18 am
by fantasea

Re: New tag save failed

Posted: Mon Aug 12, 2013 1:46 pm
by SoutherlySwell
Thanks a million for this....great community helps here!

Re: New tag save failed

Posted: Wed Aug 21, 2013 10:46 am
by hmw
Hello there,

I've got a similar problem saving tags. I'm new to Joomla and designed my site at first from a local installation using xampp and the actual Joomla distribution. I used the EasyTagCloud Module and all worked well using tags. Then I migrated Joomla from local to server using the same Joomla version. Everything is fine (as far I can see for now) except the tags handling. I checked my database and no tables are missing. By saving an article with Tags I get the following error message:

Save failed with the following error:

As the error doesn't inform me about anything I checked the entries in the DB. The tags are created in #__tags as they should and the metadata field of the article tried to save in #__content is fully replaced by {"tags":[x]} where x is the id of the new created tag. Before saving the metadata entry was {"robots":"","author":"","rights":"","xreference":""}.
Though giving a save error something is beeing saved. But there still is no Tag shown in the frontend.

Any help here?

Re: New tag save failed

Posted: Sun Aug 25, 2013 5:46 pm
by mcsmom
In 3.1.5 the save really should not be happening in metadata at all.

Re: New tag save failed

Posted: Sun Apr 27, 2014 10:35 am
by solracpt
Hi,

For those that can not save articles with (new) tags, this was what I found out:

1- Updating Joomla 3.1.x to 3.2, does not update some tables.
2- I need to insert the missing values in tables

Solution:

Open your db with phpmyadmin or other app (#__ is your prefix table).

1 -Find the table #__content_types, see if you have any rows on it.
If not, must insert the text in the attached file "fix_sql_tables_for_tags.txt" (Posts to forum have a limited text, so is in the file)

2 -Find your table #__tags, must have at least 1 row for ROOT value, if not insert this:

Code: Select all

INSERT INTO `#__tags` (`id`, `parent_id`, `lft`, `rgt`, `level`, `path`, `title`, `alias`, `note`, `description`, `published`, `checked_out`, `checked_out_time`, `access`, `params`, `metadesc`, `metakey`, `metadata`, `created_user_id`, `created_time`,`created_by_alias`, `modified_user_id`, `modified_time`, `images`, `urls`, `hits`, `language`, `version`) VALUES
(1, 0, 0, 1, 0, '', 'ROOT', 'root', '', '', 1, 0, '0000-00-00 00:00:00', 1, '{}', '', '', '', '', '2011-01-01 00:00:01','', 0, '0000-00-00 00:00:00', '', '',  0, '*', 1);
Again, don't forget to replace #__ in the queries

I hope this is useful for you ;)
If anything is missing, just say so and I add it to this post

PS:SQL full instalation queries for Joomla 3.2 is in this page https://github.com/joomla/joomla-cms/bl ... joomla.sql

Re: New tag save failed

Posted: Fri May 09, 2014 8:58 am
by cybersalt
Thanks solracpt!

In my case content_types only had the last 5 types of the 15 that your script created.

New tags are now saving when I save the article I am creating them within!

Re: New tag save failed

Posted: Sat Jun 14, 2014 10:48 am
by kubanc
Hellow!

I'm still having problems with adding tags to articles..
I have solved the problem with saving tags, but if i try to add tag to article i get error:
Error
Save failed with the following error:

and the content of error is blank.
I've already tried the solutions you mentioned above, and none of them works.

1.) I have updated Joomlao to the latest version 3.3, and i'm still having the same problem
2.) I tried to copy _content_types data from clean Joomla 3.3 database and I am still having the same problem...

Any idea how can i debug this

EDITED: It mas my fault. I was editing the wrong database. The solution mentioned by solracpt worked OK...

Re: New tag save failed

Posted: Mon Jun 16, 2014 1:02 pm
by PeregrineDesign
solracpt wrote:Hi,

For those that can not save articles with (new) tags, this was what I found out:

1- Updating Joomla 3.1.x to 3.2, does not update some tables.
2- I need to insert the missing values in tables

Solution:

Open your db with phpmyadmin or other app (#__ is your prefix table).

1 -Find the table #__content_types, see if you have any rows on it.
If not, must insert the text in the attached file "fix_sql_tables_for_tags.txt" (Posts to forum have a limited text, so is in the file)

2 -Find your table #__tags, must have at least 1 row for ROOT value, if not insert this:

Code: Select all

INSERT INTO `#__tags` (`id`, `parent_id`, `lft`, `rgt`, `level`, `path`, `title`, `alias`, `note`, `description`, `published`, `checked_out`, `checked_out_time`, `access`, `params`, `metadesc`, `metakey`, `metadata`, `created_user_id`, `created_time`,`created_by_alias`, `modified_user_id`, `modified_time`, `images`, `urls`, `hits`, `language`, `version`) VALUES
(1, 0, 0, 1, 0, '', 'ROOT', 'root', '', '', 1, 0, '0000-00-00 00:00:00', 1, '{}', '', '', '', '', '2011-01-01 00:00:01','', 0, '0000-00-00 00:00:00', '', '',  0, '*', 1);
Again, don't forget to replace #__ in the queries

I hope this is useful for you ;)
If anything is missing, just say so and I add it to this post

PS:SQL full instalation queries for Joomla 3.2 is in this page https://github.com/joomla/joomla-cms/bl ... joomla.sql
Thank you, thank you, thank you! My upgrade was faulty. My content_types did not have rows. Fixed now.

Re: New tag save failed

Posted: Wed Sep 24, 2014 9:28 am
by cloacker
solracpt wrote:Hi,

For those that can not save articles with (new) tags, this was what I found out:

1- Updating Joomla 3.1.x to 3.2, does not update some tables.
2- I need to insert the missing values in tables

Solution:

Open your db with phpmyadmin or other app (#__ is your prefix table).

1 -Find the table #__content_types, see if you have any rows on it.
If not, must insert the text in the attached file "fix_sql_tables_for_tags.txt" (Posts to forum have a limited text, so is in the file)

2 -Find your table #__tags, must have at least 1 row for ROOT value, if not insert this:

Code: Select all

INSERT INTO `#__tags` (`id`, `parent_id`, `lft`, `rgt`, `level`, `path`, `title`, `alias`, `note`, `description`, `published`, `checked_out`, `checked_out_time`, `access`, `params`, `metadesc`, `metakey`, `metadata`, `created_user_id`, `created_time`,`created_by_alias`, `modified_user_id`, `modified_time`, `images`, `urls`, `hits`, `language`, `version`) VALUES
(1, 0, 0, 1, 0, '', 'ROOT', 'root', '', '', 1, 0, '0000-00-00 00:00:00', 1, '{}', '', '', '', '', '2011-01-01 00:00:01','', 0, '0000-00-00 00:00:00', '', '',  0, '*', 1);
Again, don't forget to replace #__ in the queries

I hope this is useful for you ;)
If anything is missing, just say so and I add it to this post

PS:SQL full instalation queries for Joomla 3.2 is in this page https://github.com/joomla/joomla-cms/bl ... joomla.sql
Thank you solracpt! Your solution works perfectly.

The same problem occured with Joomla! 3.3.0, fresh install in this environment:
PHP Version 5.5.11; Apache/2.4.9; Joomla! 3.3.0 Stable; Joomla Platform 13.1.0 Stable.

Re: New tag save failed

Posted: Wed Jul 15, 2015 1:34 pm
by willhaxton
An old topic I know but it seems the best one to be able to help me.

So, Im using Joomla 3.4.3 and want to start adding tags to my articles. However, when I go to create new tags I get a similar error message to above.

I am a very novice php user so not sure if im doing this correct but i log in to my php and locate "c_tags" click on the SQL tab and paste the coding quoted here. Upon clicking go I get the following error

#1146 - Table 'MYSITEDATABASE_.#__tags' doesn't exist

I have no idea what to do next or how to fix this.

Hopefully someone can explain this to me in easy steps, all I want to do is add a few tags to each article.

Thanks in advance

Re: New tag save failed

Posted: Thu Jul 16, 2015 12:26 am
by sovainfo
As mentioned in the post the prefix $__ needs to be replaced by yours in use. Also you need to properly name the table. Wither remove the MYSITEDATABASE_ or properly qualify the table by its database.

Re: New tag save failed

Posted: Wed Jul 22, 2015 2:37 pm
by willhaxton
sovainfo wrote:As mentioned in the post the prefix $__ needs to be replaced by yours in use. Also you need to properly name the table. Wither remove the MYSITEDATABASE_ or properly qualify the table by its database.
Thank you.

Now I get this error

#1062 - Duplicate entry '1' for key 'PRIMARY'

Re: New tag save failed

Posted: Thu Jul 23, 2015 7:24 am
by sovainfo
The #1062 - duplicate entry ... means that row already exists.

Please confirm the content of #_content_types and #_tags is ok and the problem of adding tags still exists.

Re: New tag save failed

Posted: Thu Jul 23, 2015 1:25 pm
by willhaxton
sovainfo wrote:The #1062 - duplicate entry ... means that row already exists.

Please confirm the content of #_content_types and #_tags is ok and the problem of adding tags still exists.
I can confirm I still can not create tags and the original issue is still there. However, I am unsure how to confirm the content of each table or what I would even be looking for to confirm such content.

Re: New tag save failed

Posted: Fri Jul 24, 2015 6:10 am
by sovainfo
The best way to do that is looking at installation/sql/mysql/joomla.sql. It contains the inserts for #_content_type and #_tags.

Re: New tag save failed

Posted: Mon Sep 14, 2015 1:34 pm
by johnnys_joomla
Thanks solracpt - solved for me!

Re: New tag save failed

Posted: Tue Jun 07, 2016 12:20 am
by lowrentride
Worked, mcsmom ! thanks in 2016

Re: New tag save failed

Posted: Mon Jul 18, 2016 7:20 am
by hoantq
PeregrineDesign wrote:
solracpt wrote:Hi,

For those that can not save articles with (new) tags, this was what I found out:

1- Updating Joomla 3.1.x to 3.2, does not update some tables.
2- I need to insert the missing values in tables

Solution:

Open your db with phpmyadmin or other app (#__ is your prefix table).

1 -Find the table #__content_types, see if you have any rows on it.
If not, must insert the text in the attached file "fix_sql_tables_for_tags.txt" (Posts to forum have a limited text, so is in the file)

2 -Find your table #__tags, must have at least 1 row for ROOT value, if not insert this:

Code: Select all

INSERT INTO `#__tags` (`id`, `parent_id`, `lft`, `rgt`, `level`, `path`, `title`, `alias`, `note`, `description`, `published`, `checked_out`, `checked_out_time`, `access`, `params`, `metadesc`, `metakey`, `metadata`, `created_user_id`, `created_time`,`created_by_alias`, `modified_user_id`, `modified_time`, `images`, `urls`, `hits`, `language`, `version`) VALUES
(1, 0, 0, 1, 0, '', 'ROOT', 'root', '', '', 1, 0, '0000-00-00 00:00:00', 1, '{}', '', '', '', '', '2011-01-01 00:00:01','', 0, '0000-00-00 00:00:00', '', '',  0, '*', 1);
Again, don't forget to replace #__ in the queries

I hope this is useful for you ;)
If anything is missing, just say so and I add it to this post

PS:SQL full instalation queries for Joomla 3.2 is in this page https://github.com/joomla/joomla-cms/bl ... joomla.sql
Thank you, thank you, thank you! My upgrade was faulty. My content_types did not have rows. Fixed now.
Thats great, it worked with mysite http://www.diskdr.vn Joomla 3.6.
By the way for 3.6, at step two we need to use following code

Code: Select all

INSERT INTO `#__tags` (`id`, `parent_id`, `lft`, `rgt`, `level`, `path`, `title`, `alias`, `note`, `description`, `published`, `checked_out`, `checked_out_time`, `access`, `params`, `metadesc`, `metakey`, `metadata`, `created_user_id`, `created_time`, `created_by_alias`, `modified_user_id`, `modified_time`, `images`, `urls`, `hits`, `language`, `version`) VALUES
(1, 0, 0, 1, 0, '', 'ROOT', 'root', '', '', 1, 0, '0000-00-00 00:00:00', 1, '', '', '', '', 42, '2011-01-01 00:00:01', '', 0, '0000-00-00 00:00:00', '', '', 0, '*', 1);