User tests: Successful: Unsuccessful:
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.
Status | New | ⇒ | Pending |
Category | ⇒ | Administration com_fields |
@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.
Labels |
Added:
?
|
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.
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.
Shouldnt it work the same as the rest of joomla in that you cannot delete a category that has items that belong to it?
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.
I have tested this item
Use inner join in the query.
I have tested this item
@tonypartridge Please see SharkyKZ's comment.
@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"
}
@tonypartridge any Comment?
@franz-wohlkoenig sorry I've been mad. I've just made the change on my phone. Can you test please? Thanks!
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
@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.
@tonypartridge Sorry again. @SharkyKZ is right. Please revert. Thank you!
Re-Applied again.
I have tested this item
I had to manually apply the PR since the branch is out of synch causing PatchTester to patch incorrectly.
Now re-synced.
@coolcat-creations Please test. Thanks.
I have tested this item
Works as expected, thanks!!!
I have tested this item
Status | Pending | ⇒ | Ready to Commit |
RTC
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:
?
|
I assume this should be fixed in
getAssignedCategoriesTitles
.