Changing publication status

edited January 2012 in Bug Reports
When changing the status of published pages in the admin, "un-publishing" (selecting 'no' for publish and saving) empties the page variable content completely. I've tried this with Firefox 9, Chrome 16 and IE 9, with both ckeditor and markitup. The data does not seem to be deleted (it is still in the database), but dis-associated. If you reload the page, the data does not re-appear, and if you re-save, then the old data is over-written. On the same site, the CMS "blocks" module also has a "publish" field, but doesn't exhibit the same behaviour.

Is that expected - because it might as well be "delete" rather than "not publish"?

I've tested this running Windows 7 with a recent Fuel install, and I'll try with OSX later.

Comments

  • edited 9:50PM
    FWIW I can't seem to replicate that here.
  • edited 9:50PM
    I'm not able to replicate this either. Is the page ID perhaps 0 or being set to 0 after saving/publishing/unpublishing?
  • edited 9:50PM
    I've just tried the same thing on OSX and I get the same results. It's not the id = 0 issue, by the way. I'm using a copy of Fuel downloaded recently, but not the exact same code as I was using on Windows.

    On Windows I was using Wamp, but on OSX it's the vanilla Apache & PHP.
  • edited January 2012
    Just downloaded commit 007f567 and the admin now works, and I know why!! It has overwritten some changes in the page variables model. On a related issue (http://www.getfuelcms.com/forums/discussion/comment/2558/#Comment_2558) a suggestion was made that adding this line to the common query in the page varables model might be useful (it was, kind of):

    $this->db->where(array($this->_tables['pages'].'.published' => 'yes'));

    Of course, doing this hides the data from the CMS, as well as the front end (it was a solution intended to hide fuel_var() CMS content from views when data was not published). Duh!

    Sorry, false alarm.
  • edited 9:50PM
    Thanks for the heads up about pagevariables code. Perhaps the following would work:
    if (!defined('FUEL_ADMIN')) { $this->db->where(array($this->_tables['pages'].'.published' => 'yes')); }
Sign In or Register to comment.