Actions

Why are articles created in the front end not correctly set to featured?

From Joomla! Documentation

Revision as of 03:26, 13 March 2011 by Infograf768 (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Articles set to "Featured" whether by editing an existing article or creating a new one are not correctly saved in the database.

This is fixed by the patch available here: | Issue 25240

To fix manually you have to change $this->getState('article.id') to $this->getState($this->getName().'.id')

Index: administrator/components/com_content/models/article.php
===================================================================
--- administrator/components/com_content/models/article.php     (revision 20925)
+++ administrator/components/com_content/models/article.php     (working copy)
@@ -220,7 +220,7 @@
        {
                if (parent::save($data)) {
                        if (isset($data['featured'])) {
-                               $this->featured($this->getState('article.id'), $data['featured']);
+                               $this->featured($this->getState($this->getName().'.id'), $data['featured']);
                        }
                        return true;
                }