?
avatar PhocaCz
PhocaCz
28 Apr 2017

Steps to reproduce the issue

Install extension, e.g. Phoca Guestbook, add a post message and publish/unpublish it in administration. You get success message but nothing changes.

It worked since version Joomla! 3.0.0 - to version 3.6.4. In version 3.6.5 there was this change made:

file:
libraries\joomla\table\nested.php
line: cca 1022
FROM:

// Update and cascade the publishing state.
			$query2->clear()
				->update($this->_db->quoteName($this->_tbl))
				->set('published = ' . (int) $state)
				->where('(lft > ' . (int) $node->lft . ' AND rgt < ' . (int) $node->rgt . ') OR ' . $k . ' = ' . (int) $pk);
			$this->_db->setQuery($query)->execute();

TO:
$this->recursiveUpdatePublishedColumn($pk, $state);

Expected result

Item will be published/unpublished

Actual result

Success is returned but no action done

System information (as much as possible)

Joomla! 3.6.4 - OK
Joomla! 3.6.5 - 3.0.7 - NOT OK

PHP7

Additional comments

avatar PhocaCz PhocaCz - open - 28 Apr 2017
avatar joomla-cms-bot joomla-cms-bot - change - 28 Apr 2017
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 28 Apr 2017
avatar PhocaCz PhocaCz - edited - 28 Apr 2017
avatar franz-wohlkoenig franz-wohlkoenig - change - 28 Apr 2017
Category Administration
avatar PhocaCz PhocaCz - change - 28 Apr 2017
The description was changed
avatar PhocaCz PhocaCz - edited - 28 Apr 2017
avatar PhocaCz PhocaCz - change - 28 Apr 2017
The description was changed
avatar PhocaCz PhocaCz - edited - 28 Apr 2017
avatar PhocaCz PhocaCz - change - 28 Apr 2017
The description was changed
avatar PhocaCz PhocaCz - edited - 28 Apr 2017
avatar csthomas
csthomas - comment - 28 Apr 2017

The quick solution is to run a query:

UPDATE `#__phocaguestbook_items` SET `published` = '1' WHERE `j37_phocaguestbook_items`.`id` = 1;

The new code requires to have published column equal to 1 for ROOT row.

avatar PhocaCz
PhocaCz - comment - 28 Apr 2017

Hi, thank you for the info, yes I see it now. The root must be published since Joomla! 3.6.5 - I am working now on update.

When the root is published, then standard method to publish/unpublish the items through nested table class (including testing of parent elements, etc.) works again.

So this can be closed (for other developers: since Joomla! 3.6.5 root level must be set as "publish"

Thank you.

avatar PhocaCz PhocaCz - change - 28 Apr 2017
The description was changed
Status New Closed
Closed_Date 0000-00-00 00:00:00 2017-04-28 14:50:17
Closed_By PhocaCz
avatar PhocaCz PhocaCz - close - 28 Apr 2017

Add a Comment

Login with GitHub to post a comment