45 Posts
Sven
9 years ago
Topic

Hello, I try to archive the following: 

I want to add Joomlas Article Tags to the "Admin Form" and the "Content" View. It works well as long as the Option "Smart Search" of my Form & Content Type ist set to "none" or "Intro". 

But I need the Smart Search option set on "Content", because this is what I want to be indexed - including the Tags. But if I set the options like that, I can't save my article any longer. 

I just get several errors:  

Notice: Undefined index: itemId in [...]\libraries\cck\base\form\store_inc.php on line 63
Notice: Undefined index: message in [...]\libraries\cck\base\form\store_inc.php on line 64
Notice: Undefined index: url in [...]\libraries\cck\base\form\store_inc.php on line 74 ( ! )
Fatal error: Class 'TagsHelperRoute' not found in [...]\layouts\joomla\content\tags.php on line 24 Call Stack #TimeMemoryFunctionLocation 10.0005313600{ ...TextText [...]

Any help is appreciated.

Thanks
Sven

Get a VIP membership
15 Posts
michaelq
8 years ago
6
Level 1

I got e similar error when saving an article based on Seblod with tags in the tag-field and "Smart Search" on "Content".

Fatal error: Class 'TagsHelperRoute' not found in [...]\joomla\content\tags.php on line 24

Without tags in the article, the article could be saved.

4229 Posts
Kadministrator
8 years ago
5
Level 2

I just tested and it works fine for me. 

Which joomla/seblod and php versions do you use?

15 Posts
michaelq
8 years ago
4
Level 3

Thanks Klas for looking into it!

I got errors on two different installtions. On both installations I am using Joomla 3.5.1 and Seblod 3.8.1. One installation is at a hosting provider another is a local xampp installation.

The only special thing is, that the Joomla installations are configured as multilanguage sites.

Here are the configuration information
--- hosting provider ---
Database Version 5.1.73
Database Collation utf8_general_ci
Database Connection Collation utf8_general_ci
PHP Version 5.4.45
Web Server Apache/2.2.15 (Red Hat)
Joomla! Version Joomla! 3.5.1 Stable [ Unicorn ] 05-April-2016 22:45 GMT

--- xampp installation ---
Database Version 5.6.26
Database Collation utf8_general_ci
Database Connection Collation utf8mb4_general_ci
PHP Version 5.6.12
Web Server Apache/2.4.16 (Win32) OpenSSL/1.0.1p PHP/5.6.12
Joomla! Version Joomla! 3.5.1 Stable [ Unicorn ] 05-April-2016 22:45 GMT

I did a fresh installation of Joomla and Seblod and there is the error not happening. I exported the app I created from the old installation and imported it into the new installation. But some some subfolders of the app where not created and all content, that should be in these folders are now under SEBLOD/App.

Strange! Something is wrong! Perhaps I have to rebuild the whole system to get rid of this error....

4229 Posts
Kadministrator
8 years ago
3
Level 4

Perhaps there were some issues with permissions on the file system and since not all files got updated - try unpacking new install of joomla to a local directory (without install directory), then upload manually all files again to your site.

15 Posts
michaelq
8 years ago
2
Level 5

Did not work, same problem. But it could be related to the updates I made since October 2015, when I started working with Seblod. I updated both Joomla and Seblod since then from 3.4.8 and 3.7.2 to the actual versions.

4229 Posts
Kadministrator
8 years ago
1
Level 6

Fatal error: Class 'TagsHelperRoute' not found in [...]\joomla\content\tags.php on line 24

should not appear if you have a recent joomla as it has this line at the beggining 

JLoader::register('TagsHelperRoute', JPATH_BASE . '/components/com_tags/helpers/route.php'); 

- this line loads class that is supposed to be missing.

Only reasons that this would not work would be if

  • this line is missing
  • JPATH_BASE is not defined
  •  components/com_tags/helpers/route.php file is missing
15 Posts
michaelq
8 years ago
0
Level 7

I checked and all of your suggestion, but nothing was missing. I could also not find any difference between the new installation and an the updated installation regarding the Joomla and Seblod files.

So I looked a little bit further into the issue: I switched the database of the updated installation to to the new installation. The result was that the issue is now occurring in the new installation too. My conclusion is, that it has something to do with the content of the database and not  with the files of the cms and cck. 

Btw: The error I got is the same as describe here:

http://www.seblod.com/community/forums/forms-content-types/after-adding-joomla-tags-to-content-type-saving-article-returns-empty-page

The error message I reported is only shown when you look at the html code of the page, the rendered out put of the page is just showing a dot.

So it could have to do with the update from Seblod 3.7.2 to 3.8.1

4229 Posts
Kadministrator
8 years ago
1
Level 1

Great to see that you help us find a cause as it is hard for us to resolve the problem as we can't reproduce it, this error should not have any connection to database settings whatsoever as class loading is done by files not database, so this is what it makes extra strange..

Anyway, try checking how your article tags field configuration looks like, if not already try setting Mode to Ajax (default global should work here, but you might be getting different value due to some reason), Parent to No and Multiple to Yes

15 Posts
michaelq
8 years ago
0
Level 2

Hello Klas

Perhaps I put my last post on the wrong level?

Best regards

Michael

15 Posts
michaelq
8 years ago
1
Level 1

After I recreated the whole App with a fresh installation of Joomla 3.5.1 and 3.8.2, the error occurred again! This moment was really frustrating because I recreated manually about 300 fields, 6 forms & content type and one list & search type.

So I investigated further because I am sure now, it has nothing to do with the database or the installed versions of Seblod, and I finally found out how to reproduce the error! It also has nothing to do with the back end of Joomla directly.

The error occurs when the „JForm - Tag“ field type is used in any position of the „Content“ view in any „Article“ based „Form & Content Type“

The error occurs with the following conditions:

1. Smart Search plugin in Joomla is enabled

2. The parameter „Smart Search“ is set to „Content“ in the extended options of a „Form & Content Type“

3. A „JForm – Tag“ field is added to any position in the „Content“ view of a „Form & Content Type“

4. Some content with tags is opened on the back end (based on any „Form & Content Type“ with the „JForm –Tag“ field in the „Content“ view), and any „Save“ button is clicked.


Smart Search tries to update the index when saving an article on the back end. The index is updated on the basis of the „Content“ view. The „JForm – Field“ cannot be updated.

To reproduce the error just add a „JForm – Tag“ Field in the predefined „Article“ content type and set up the condition mentioned above.

Best regards

Michael

4229 Posts
Kadministrator
8 years ago
0
Level 2

Hi,

using this info I was finally able to reproduce the problem - joomla tries to load class from wrong place when in admin, I made a pull to fix this:

https://github.com/Octopoos/SEBLOD/pull/230

You can make the same chage - add

JLoader::register('TagsHelperRoute', JPATH_SITE . '/components/com_tags/helpers/route.php'); to the

onCCK_FieldPrepareContent function of plugins/cck_field/jform_tag/jform_tag.php

8 years ago
0
Level 1

Hello,

Klas' fix has been merged, and released within SEBLOD 3.8.4

Thanks,
Saba.

Get a Book for SEBLOD