? ? Pending

User tests: Successful: Unsuccessful:

avatar tonypartridge
tonypartridge
6 Apr 2018

Pull Request for Issue #20066 .IF categories are removed from the systems after being allocated to a field the field still has the category id and it is included in the implode.

This PR just removes null/non callable array items from the category display.

avatar tonypartridge tonypartridge - open - 6 Apr 2018
avatar tonypartridge tonypartridge - change - 6 Apr 2018
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 6 Apr 2018
Category Administration com_fields
avatar Quy
Quy - comment - 6 Apr 2018

I assume this should be fixed in getAssignedCategoriesTitles.

avatar tonypartridge
tonypartridge - comment - 6 Apr 2018

@Quy I did contemplate that... but wasn’t sure if someone maybe check in for null values to see if categories had been removed. Maybe I was just over thinking it?

On 6 Apr 2018, 05:34 +0100, Quy notifications@github.com, wrote:

I assume this should be fixed in getAssignedCategoriesTitles.

You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.

avatar tonypartridge tonypartridge - change - 6 Apr 2018
Labels Added: ?
avatar laoneo
laoneo - comment - 6 Apr 2018

Do we have the same problem when a category is unpublished? If it is only the case when a category is deleted, then it would probably be better to solve the root cause and clean up the relation table when a category is deleted. Similar to what we do when an item is deleted here.

avatar tonypartridge
tonypartridge - comment - 6 Apr 2018

 No the issue only occurs when it cannot find the category.

On 6 Apr 2018, 08:02 +0100, Allon Moritz notifications@github.com, wrote:

Do we have the same problem when a category is unpublished? If it is only the case when a category is deleted, then it would probably be better to solve the root cause and clean up the relation table when a category is deleted. Similar to what we do when an item is deleted here.

You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.

avatar brianteeman
brianteeman - comment - 6 Apr 2018

Shouldnt it work the same as the rest of joomla in that you cannot delete a category that has items that belong to it?

avatar tonypartridge
tonypartridge - comment - 6 Apr 2018

Not really since fields might be assigned to a category but no content filled out within them. Preventing deleting categories because a field is set to apply to them would be overkill and could cause a world of confusion imho.

On 6 Apr 2018, 08:23 +0100, Brian Teeman notifications@github.com, wrote:

Shouldnt it work the same as the rest of joomla in that you cannot delete a category that has items that belong to it?

You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.

avatar Quy
Quy - comment - 6 Apr 2018

I have tested this item successfully on 309894e


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/20093.

avatar Quy Quy - test_item - 6 Apr 2018 - Tested successfully
avatar SharkyKZ
SharkyKZ - comment - 8 Apr 2018

Use inner join in the query.

avatar ReLater
ReLater - comment - 24 Apr 2018

I have tested this item successfully on 309894e


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/20093.

avatar ReLater ReLater - test_item - 24 Apr 2018 - Tested successfully
avatar Quy
Quy - comment - 24 Apr 2018

@tonypartridge Please see SharkyKZ's comment.

avatar Quy
Quy - comment - 27 Apr 2018

@tonypartridge Inner is the way to go.

LEFT

array(3) {
  [0]=>
  string(20) "Sample Data-Articles"
  [1]=>
  NULL
  [2]=>
  string(5) "Test2"
}

INNER

array(2) {
  [0]=>
  string(20) "Sample Data-Articles"
  [1]=>
  string(5) "Test2"
}
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 16 Jun 2018

@tonypartridge any Comment?

avatar tonypartridge
tonypartridge - comment - 18 Jun 2018

@franz-wohlkoenig sorry I've been mad. I've just made the change on my phone. Can you test please? Thanks!

avatar Quy Quy - test_item - 19 Jun 2018 - Tested successfully
avatar Quy
Quy - comment - 19 Jun 2018

Sorry to give you the wrong info as the last commit works for Fields but not under Articles when editing an article.

What you had previously works.

Call to undefined method FieldsHelper::displayFieldOnForm()
\administrator\components\com_fields\libraries\fieldsplugin.php:156 

Call stack
# 	Function 	Location
1 	() 	JROOT\administrator\components\com_fields\libraries\fieldsplugin.php:156
2 	FieldsPlugin->onCustomFieldsPrepareDom() 	JROOT\libraries\joomla\event\event.php:70
3 	JEvent->update() 	JROOT\libraries\joomla\event\dispatcher.php:160
4 	JEventDispatcher->trigger() 	JROOT\libraries\src\Application\BaseApplication.php:108
5 	Joomla\CMS\Application\BaseApplication->triggerEvent() 	JROOT\administrator\components\com_fields\helpers\fields.php:460
6 	FieldsHelper::prepareForm() 	JROOT\plugins\system\fields\fields.php:289
7 	PlgSystemFields->onContentPrepareForm() 	JROOT\libraries\joomla\event\event.php:70
8 	JEvent->update() 	JROOT\libraries\joomla\event\dispatcher.php:160
9 	JEventDispatcher->trigger() 	JROOT\libraries\src\MVC\Model\FormModel.php:321
10 	Joomla\CMS\MVC\Model\FormModel->preprocessForm() 	JROOT\administrator\components\com_content\models\article.php:922
11 	ContentModelArticle->preprocessForm() 	JROOT\libraries\src\MVC\Model\FormModel.php:242
12 	Joomla\CMS\MVC\Model\FormModel->loadForm() 	JROOT\administrator\components\com_content\models\article.php:463
13 	ContentModelArticle->getForm() 	JROOT\libraries\src\MVC\View\HtmlView.php:423
14 	Joomla\CMS\MVC\View\HtmlView->get() 	JROOT\administrator\components\com_content\views\article\view.html.php:63
15 	ContentViewArticle->display() 	JROOT\libraries\src\MVC\Controller\BaseController.php:672
16 	Joomla\CMS\MVC\Controller\BaseController->display() 	JROOT\administrator\components\com_content\controller.php:54
17 	ContentController->display() 	JROOT\libraries\src\MVC\Controller\BaseController.php:710
18 	Joomla\CMS\MVC\Controller\BaseController->execute() 	JROOT\administrator\components\com_content\content.php:21
19 	require_once() 	JROOT\libraries\src\Component\ComponentHelper.php:382
20 	Joomla\CMS\Component\ComponentHelper::executeComponent() 	JROOT\libraries\src\Component\ComponentHelper.php:357
21 	Joomla\CMS\Component\ComponentHelper::renderComponent() 	JROOT\libraries\src\Application\AdministratorApplication.php:101
22 	Joomla\CMS\Application\AdministratorApplication->dispatch() 	JROOT\libraries\src\Application\AdministratorApplication.php:159
23 	Joomla\CMS\Application\AdministratorApplication->doExecute() 	JROOT\libraries\src\Application\CMSApplication.php:195
24 	Joomla\CMS\Application\CMSApplication->execute() 	JROOT\administrator\index.php:51 
avatar tonypartridge
tonypartridge - comment - 19 Jun 2018

no worries @Quy try again now :-)

avatar SharkyKZ
SharkyKZ - comment - 19 Jun 2018

@tonypartridge the issue described by @Quy is not related to changes in this PR. Revert previous commit please. You need to sync tonypartridge/patch-7 with joomla-cms/staging to solve the issue.

avatar Quy
Quy - comment - 19 Jun 2018

@tonypartridge Sorry again. @SharkyKZ is right. Please revert. Thank you!

avatar tonypartridge
tonypartridge - comment - 20 Jun 2018

Re-Applied again.

avatar Quy Quy - test_item - 20 Jun 2018 - Tested successfully
avatar Quy
Quy - comment - 20 Jun 2018

I have tested this item successfully on 67629fd

I had to manually apply the PR since the branch is out of synch causing PatchTester to patch incorrectly.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/20093.

avatar tonypartridge
tonypartridge - comment - 20 Jun 2018

Now re-synced.

avatar Quy
Quy - comment - 22 Jun 2018

@coolcat-creations Please test. Thanks.

avatar coolcat-creations coolcat-creations - test_item - 25 Jun 2018 - Tested successfully
avatar coolcat-creations
coolcat-creations - comment - 25 Jun 2018

I have tested this item successfully on 36525a4

Works as expected, thanks!!!


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/20093.

avatar Quy Quy - test_item - 25 Jun 2018 - Tested successfully
avatar Quy
Quy - comment - 25 Jun 2018

I have tested this item successfully on 36525a4


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/20093.

avatar Quy Quy - change - 25 Jun 2018
Status Pending Ready to Commit
avatar Quy
Quy - comment - 25 Jun 2018

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/20093.

avatar mbabker mbabker - change - 29 Jun 2018
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2018-06-29 01:42:16
Closed_By mbabker
Labels Added: ?
avatar mbabker mbabker - close - 29 Jun 2018
avatar mbabker mbabker - merge - 29 Jun 2018

Add a Comment

Login with GitHub to post a comment