Currently, on Open Atrium 2.25, attempting to use the "Preview" button when creating a new node causes a fatal error:
PDOException: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'content_id' cannot be null: INSERT INTO {flag_content} (fid, content_type, content_id, uid, sid, timestamp) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4, :db_insert_placeholder_5); Array ( [:db_insert_placeholder_0] => 3 [:db_insert_placeholder_1] => node [:db_insert_placeholder_2] => [:db_insert_placeholder_3] => 1 [:db_insert_placeholder_4] => 0 [:db_insert_placeholder_5] => 1417014685 ) in flag_flag->_flag() (line 801 of /var/aegir/prj/bucketb_atrium/modules/contrib/flag/flag.inc).
This seems like a bug in the Flag module.
However! The "Preview" button doesn't really show a preview anyway - it renders the node without using the Panelizer defaults, only the default display settings. To get a real preview of what the node will look like, the "Save as draft" button works better!
So, should we remove the "Preview" button from all node types, and instead encourage use of the "Save as draft" button?
If there is agreement on this, I can create some patches...
Comments
Comment #1
Argus commentedThe preview option is a Drupal submission form setting on the content types' edit page. I would agree setting it to Disabled by default. But if someone would change the setting to Optional or Required the bug you found would still be there. So perhaps better separate this Feature Request and the Bug report?
Comment #2
mpotter commentedComment #3
hefox commentedI agree that should disable preview for now -- @mpotter?
Comment #4
mpotter commentedYep, I agree.
Comment #5
hefox commentedDone for all core oa types, opened issue in worktracker to do it there.