Open an article, add a tag, save
An error message comes up saying nothing about the reason for failure.
Debug log shows ES KONNTE KEIN INDEX-SCHLÜSSEL GENUTZT WERDEN
indicating missing index issues
@brandiware
Which version of Joomla
Which version of php
Is this an existing tag or a new one being created in the article edit page
Category | ⇒ | Tags |
Priority | Urgent | ⇒ | Medium |
Status | New | ⇒ | Information Required |
Please check if that file exists: https://github.com/joomla/joomla-cms/blob/staging/administrator/components/com_tags/helpers/tags.php
Btw. that file does nothing realted to the tags functions. It just call it self ;)
@zero-24 the file and directory is missing (Post recent upgrade from 3.4.8 to 3.5RC2 and from php5.6 to php7). Existed before the update and gone afterwards.
Redid my test updating via the Joomla update component without the php change. Same results, existed before the update and is missing after the update.
I downloaded the package and the file and folder exist. So I'm not sure what's happening with the update via the Joomla! update extension when the source is https://github.com/joomla/joomla-cms/releases/download/3.5.0-rc2/Joomla_3.5.0-rc2-Release_Candidate-Update_Package.zip
The file is in the source but is getting removed from the site files.
@zero-24 the helper folder is missing from the tags.xml administrator files folder section. That might have something to do with the problem I'm seeing.
https://github.com/joomla/joomla-cms/blob/staging/administrator/components/com_tags/tags.xml
@photodude While #9428 is technically correct, it's not the full fix. The directory is in the deleted files listing in the upgrade script: https://github.com/joomla/joomla-cms/blob/staging/administrator/components/com_admin/script.php#L1497
Fix that and you're good to go.
@brianteeman here are the details on my installation:
PHP erstellt für Windows NT BRANDIWARE1 6.2 build 9200 (Windows 8 Professional Edition) i586
Datenbankversion 5.5.5-10.1.10-MariaDB
Datenbankzeichensatz utf8_general_ci
Database Connection Collation utf8mb4_general_ci
PHP-Version 5.6.19
Webserver Apache/2.4.17 (Win32) OpenSSL/1.0.2d PHP/5.6.19
PHP-Interface für den Webserver apache2handler
Joomla!-Version Joomla! 3.5.0-rc2 Release Candidate [ Ember ] 13-March-2016 22:30 GMT
Joomla!-Plattform-Version Joomla Platform 13.1.0 Stable [ Curiosity ] 24-Apr-2013 00:00 GMT
Browsererkennung Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.87 Safari/537.36
@brianteemann - sorry you also asked for this: I created the tags using the tag editor from the components menu, then added the tags to an existing article.
In my installation the helper folder exists
\administrator\components\com_admin\helpers\html
as you can see it contains a html folder and there is no tags.php
or am I in the wrong directory ?
sorry, I was in the wrong folder
htdocs\administrator\components\com_tags\helpers
exists as well an contains a tags.php
I couldn't replicate this on my setup with RC3 adding an existing tag to an article although am running php 5.5 :/
Just upgraded to RC3, no change - still the same error
@brandiware Adding an existing Tag to an existing Article on J3.5.0-rc3 works fine, so i could not find an Error Message. Or do i miss something on your Issue?
Setup is PHP 5.6.13, MySQLi 5.5.47-0+deb7u1.
Here the php_errors:
[15-Mar-2016 08:25:11 Europe/Berlin] PHP Notice: Trying to get property of non-object in D:\Data\Development\xamppNeu\htdocs\brandiware\libraries\cms\ucm\content.php on line 132
[15-Mar-2016 08:25:11 Europe/Berlin] PHP Notice: Trying to get property of non-object in D:\Data\Development\xamppNeu\htdocs\brandiware\libraries\cms\ucm\content.php on line 136
[15-Mar-2016 08:25:11 Europe/Berlin] PHP Notice: Trying to get property of non-object in D:\Data\Development\xamppNeu\htdocs\brandiware\libraries\cms\ucm\content.php on line 136
[15-Mar-2016 08:25:11 Europe/Berlin] PHP Warning: Invalid argument supplied for foreach() in D:\Data\Development\xamppNeu\htdocs\brandiware\libraries\cms\ucm\content.php on line 138
[15-Mar-2016 08:25:11 Europe/Berlin] PHP Notice: Trying to get property of non-object in D:\Data\Development\xamppNeu\htdocs\brandiware\libraries\cms\ucm\content.php on line 159
[15-Mar-2016 08:25:11 Europe/Berlin] PHP Notice: Trying to get property of non-object in D:\Data\Development\xamppNeu\htdocs\brandiware\libraries\cms\ucm\content.php on line 160
[15-Mar-2016 08:25:11 Europe/Berlin] PHP Notice: Undefined index: core_content_item_id in D:\Data\Development\xamppNeu\htdocs\brandiware\libraries\cms\helper\tags.php on line 823
Hi all, I installed the latest XAMPP and upgraded Joomla to RC4. Unfortunately the error persists. Is there an easy way to roll-back to a stable version of Joomla except installing a backup ?
Thanks for any help on this
@brandiware Turn on debug in the global setting and reproduce your errors with tags. If you get a stack trace it would be helpful in understanding your issue with tags.
@photodude ok here is what I get when I 1.create a new tag 2. create a new article 3. add the tag to the article and save.
I tried to extract the relevant data only, not sure how to get a different stack trace out of Joomla. Is there any option in php.ini for this ? I will try to debug in Eclipse again. Please let me know what I can do to provide you with better debug info.
Thanks a lot
brandiware
[17-Mar-2016 11:38:01 Europe/Berlin] PHP Notice: Trying to get property of non-object in D:\Data\Development\xampp\htdocs\brandiware\libraries\cms\ucm\content.php on line 132
[17-Mar-2016 11:38:01 Europe/Berlin] PHP Notice: Trying to get property of non-object in D:\Data\Development\xampp\htdocs\brandiware\libraries\cms\ucm\content.php on line 136
[17-Mar-2016 11:38:01 Europe/Berlin] PHP Notice: Trying to get property of non-object in D:\Data\Development\xampp\htdocs\brandiware\libraries\cms\ucm\content.php on line 136
[17-Mar-2016 11:38:01 Europe/Berlin] PHP Warning: Invalid argument supplied for foreach() in D:\Data\Development\xampp\htdocs\brandiware\libraries\cms\ucm\content.php on line 138
[17-Mar-2016 11:38:01 Europe/Berlin] PHP Notice: Trying to get property of non-object in D:\Data\Development\xampp\htdocs\brandiware\libraries\cms\ucm\content.php on line 159
[17-Mar-2016 11:38:01 Europe/Berlin] PHP Notice: Trying to get property of non-object in D:\Data\Development\xampp\htdocs\brandiware\libraries\cms\ucm\content.php on line 160
no errors in my sql
#
#<?php die('Forbidden.'); ?>
#Date: 2016-03-17 10:36:28 UTC
#Software: Joomla Platform 13.1.0 Stable [ Curiosity ] 24-Apr-2013 00:00 GMT
#Fields: datetime priority clientip category message
2016-03-17T10:36:28+00:00 INFO ::1 controller Holding edit ID com_content.edit.article.117 Array ( [0] => 117 )
2016-03-17T10:36:28+00:00 INFO ::1 controller Checking edit ID com_content.edit.article.117: 1 Array ( [0] => 117 )
2016-03-17T10:36:34+00:00 INFO ::1 controller Checking edit ID com_content.edit.article.117: 1 Array ( [0] => 117 )
2016-03-17T10:36:59+00:00 INFO ::1 controller Releasing edit ID com_content.edit.article.117 Array ( )
2016-03-17T10:37:24+00:00 INFO ::1 controller Holding edit ID com_tags.edit.tag.9 Array ( [0] => 9 )
2016-03-17T10:37:24+00:00 INFO ::1 controller Checking edit ID com_tags.edit.tag.9: 1 Array ( [0] => 9 )
2016-03-17T10:37:29+00:00 INFO ::1 controller Releasing edit ID com_tags.edit.tag.9 Array ( )
2016-03-17T10:37:55+00:00 INFO ::1 controller Holding edit ID com_content.edit.article.118 Array ( [0] => 118 )
2016-03-17T10:37:55+00:00 INFO ::1 controller Checking edit ID com_content.edit.article.118: 1 Array ( [0] => 118 )
SELECT t
.id
FROM biw1_tags
AS t
INNER JOIN biw1_contentitem_tag_map
AS m
ON m
.tag_id
= t
.id
AND m
.type_alias
= 'com_content.article'
AND m
.content_item_id
IN ( 118)
Explain
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE m ALL idx_tag_type NO INDEX KEY COULD BE USED NULL NULL 1 Using where
1 SIMPLE t eq_ref PRIMARY PRIMARY 4 brandiwareweb1.m.tag_id 1 Using index
Call Stack
15 JDatabaseDriverMysqli->execute() JROOT\libraries\joomla\database\driver.php:1476
14 JDatabaseDriver->loadColumn() JROOT\libraries\cms\helper\tags.php:478
13 JHelperTags->getTagIds() JROOT\administrator\components\com_content\models\article.php:298
12 ContentModelArticle->getItem() JROOT\libraries\legacy\view\legacy.php:401
11 JViewLegacy->get() JROOT\administrator\components\com_content\views\article\view.html.php:50
10 ContentViewArticle->display() JROOT\libraries\legacy\controller\legacy.php:690
9 JControllerLegacy->display() JROOT\administrator\components\com_content\controller.php:52
8 ContentController->display() JROOT\libraries\legacy\controller\legacy.php:728
7 JControllerLegacy->execute() JROOT\administrator\components\com_content\content.php:21
6 require_once JROOT\administrator\components\com_content\content.php JROOT\libraries\cms\component\helper.php:405
5 JComponentHelper::executeComponent() JROOT\libraries\cms\component\helper.php:380
4 JComponentHelper::renderComponent() JROOT\libraries\cms\application\administrator.php:98
3 JApplicationAdministrator->dispatch() JROOT\libraries\cms\application\administrator.php:152
2 JApplicationAdministrator->doExecute() JROOT\libraries\cms\application\cms.php:257
1 JApplicationCms->execute() JROOT\administrator\index.php:51
SELECT DISTINCT a.id AS value, a.title AS text, a.level, a.published, a.lft
FROM (
SELECT id,title,level,published,parent_id,extension,lft,rgt
FROM biw1_categories
WHERE (extension = 'com_content')
AND published IN (0,1)) AS a
LEFT JOIN biw1_categories
AS b
ON a.lft > b.lft
AND a.rgt < b.rgt
ORDER BY a.lft ASC
Explain
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE biw1_categories ref cat_idx cat_idx 202 const 30 Using index condition; Using where; Using temporary; Using filesort
1 SIMPLE b ALL idx_left_right NO INDEX KEY COULD BE USED NULL NULL 72 Range checked for each record (index map: 0x20); Distinct
Call Stack
22 JDatabaseDriverMysqli->execute() JROOT\libraries\joomla\database\driver.php:1627
21 JDatabaseDriver->loadObjectList() JROOT\administrator\components\com_categories\models\fields\categoryedit.php:123
20 JFormFieldCategoryEdit->getOptions() JROOT\libraries\joomla\form\fields\list.php:58
19 JFormFieldList->getInput() JROOT\libraries\joomla\form\field.php:962
18 JFormField->renderField() JROOT\libraries\joomla\form\form.php:663
17 JForm->renderField() JROOT\layouts\joomla\edit\global.php:62
16 include JROOT\layouts\joomla\edit\global.php JROOT\libraries\cms\layout\file.php:121
15 JLayoutFile->render() JROOT\libraries\cms\layout\helper.php:72
14 JLayoutHelper::render() JROOT\administrator\components\com_content\views\article\tmpl\edit.php:92
13 include JROOT\administrator\components\com_content\views\article\tmpl\edit.php JROOT\libraries\legacy\view\legacy.php:670
12 JViewLegacy->loadTemplate() JROOT\libraries\legacy\view\legacy.php:209
11 JViewLegacy->display() JROOT\administrator\components\com_content\views\article\view.html.php:68
10 ContentViewArticle->display() JROOT\libraries\legacy\controller\legacy.php:690
9 JControllerLegacy->display() JROOT\administrator\components\com_content\controller.php:52
8 ContentController->display() JROOT\libraries\legacy\controller\legacy.php:728
7 JControllerLegacy->execute() JROOT\administrator\components\com_content\content.php:21
6 require_once JROOT\administrator\components\com_content\content.php JROOT\libraries\cms\component\helper.php:405
5 JComponentHelper::executeComponent() JROOT\libraries\cms\component\helper.php:380
4 JComponentHelper::renderComponent() JROOT\libraries\cms\application\administrator.php:98
3 JApplicationAdministrator->dispatch() JROOT\libraries\cms\application\administrator.php:152
2 JApplicationAdministrator->doExecute() JROOT\libraries\cms\application\cms.php:257
1 JApplicationCms->execute() JROOT\administrator\index.php:51
SELECT DISTINCT a.id AS value, a.path, a.title AS text, a.level, a.published, a.lft
FROM biw1_tags AS a
LEFT JOIN biw1_tags
AS b
ON a.lft > b.lft
AND a.rgt < b.rgt
WHERE a
.lft
> 0
AND a.published IN (0,1)
ORDER BY a.lft ASC
Explain
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE a range tag_idx,idx_left_right idx_left_right 4 NULL 2 Using index condition; Using where; Using temporary; Using filesort
1 SIMPLE b ALL idx_left_right NO INDEX KEY COULD BE USED NULL NULL 3 Range checked for each record (index map: 0x20); Distinct
Call Stack
23 JDatabaseDriverMysqli->execute() JROOT\libraries\joomla\database\driver.php:1627
22 JDatabaseDriver->loadObjectList() JROOT\libraries\cms\form\field\tag.php:145
21 JFormFieldTag->getOptions() JROOT\libraries\joomla\form\fields\list.php:58
20 JFormFieldList->getInput() JROOT\libraries\cms\form\field\tag.php:99
19 JFormFieldTag->getInput() JROOT\libraries\joomla\form\field.php:962
18 JFormField->renderField() JROOT\libraries\joomla\form\form.php:663
17 JForm->renderField() JROOT\layouts\joomla\edit\global.php:62
16 include JROOT\layouts\joomla\edit\global.php JROOT\libraries\cms\layout\file.php:121
15 JLayoutFile->render() JROOT\libraries\cms\layout\helper.php:72
14 JLayoutHelper::render() JROOT\administrator\components\com_content\views\article\tmpl\edit.php:92
13 include JROOT\administrator\components\com_content\views\article\tmpl\edit.php JROOT\libraries\legacy\view\legacy.php:670
12 JViewLegacy->loadTemplate() JROOT\libraries\legacy\view\legacy.php:209
11 JViewLegacy->display() JROOT\administrator\components\com_content\views\article\view.html.php:68
10 ContentViewArticle->display() JROOT\libraries\legacy\controller\legacy.php:690
9 JControllerLegacy->display() JROOT\administrator\components\com_content\controller.php:52
8 ContentController->display() JROOT\libraries\legacy\controller\legacy.php:728
7 JControllerLegacy->execute() JROOT\administrator\components\com_content\content.php:21
6 require_once JROOT\administrator\components\com_content\content.php JROOT\libraries\cms\component\helper.php:405
5 JComponentHelper::executeComponent() JROOT\libraries\cms\component\helper.php:380
4 JComponentHelper::renderComponent() JROOT\libraries\cms\application\administrator.php:98
3 JApplicationAdministrator->dispatch() JROOT\libraries\cms\application\administrator.php:152
2 JApplicationAdministrator->doExecute() JROOT\libraries\cms\application\cms.php:257
1 JApplicationCms->execute() JROOT\administrator\index.php:51
@photodude
Got the xdebug up an running. What I find is a null $contentType at
htdocs\brandiware\libraries\cms\ucm\content.php on line 132, referer: http://localhost/brandiware/administrator/index.php?option=com_content&view=article&layout=edit&id=117:
$contentType = isset($type) ? $type : $this->type;
$fields = json_decode($contentType->type->field_mappings);
$ucmData = array();
$common = (is_object($fields->common)) ? $fields->common : $fields->common[0];
foreach ($common as $i => $field)
Please find attached the error.log with the detailed stack trace. Hope this helps.
Thanks
one more try: the $primaryId in helper/tags.php:816... results in a null pointer as well:
// Process the tags
$data = $this->getRowData($table);
$ucmContentTable = JTable::getInstance('Corecontent');
$ucm = new JUcmContent($table, $this->typeAlias);
$ucmData = $data ? $ucm->mapData($data) : $ucm->ucmData;
$primaryId = $ucm->getPrimaryKey($ucmData['common']['core_type_id'], $ucmData['common']['core_content_item_id']);
$result = $ucmContentTable->load($primaryId);
$result = $result && $ucmContentTable->bind($ucmData['common']);
I have no clue what is going on here.
@brandiware Thanks for more detailed debug traces and reports. This will definitely help someone in tracking down the issue.
Status | Information Required | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2016-03-21 21:41:42 |
Closed_By | ⇒ | brandiware |
Hi all,
this issue is solved. It was not due to the joomla update but due to an error in a template I used from joomlage. It comes with a full demo site installing joomla and the demo site in one go. The package I used clearly produces this error. Installing the bare template on a clean joomla database does not result in the error I experienced.
Thanks all for you support, sorry for the hassle.
Cheers
brandiware
Thanks for the update @brandiware, glad your Tags issue and mine both got solved.
I'm seeing something similar with 3rd party components with the following warning in the server logs
PHP Warning: require_once(/administrator/components/com_tags/helpers/tags.php): failed to open stream: No such file or directory
J3.5RC
PHP7
Existing Tags in 3rdParty components which use the Joomla tags manager for Tag functionality