Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Patch for [#27216] to fix greyed out edit-state fields, because empty data it was looking to component permissions
diff --git administrator/components/com_content/models/article.php administrator/components/com_content/models/article.php
index 3c5015f82ccf7dab85d56809c5080fa6047a53d6..9c0130e59d113338c098f320c3463def3cb63109 100644
--- administrator/components/com_content/models/article.php
+++ administrator/components/com_content/models/article.php
@@ -168,6 +168,7 @@ class ContentModelArticle extends JModelAdmin
}
// Modify the form based on Edit State access controls.
+ $data = $this->loadFormData();
if (!$this->canEditState((object) $data)) {
// Disable fields for display.
$form->setFieldAttribute('featured', 'disabled', 'true');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment