If I enable read-only mode for a content type, and then preview a new node of that type, any new tags that I had entered are lost.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

dboulet’s picture

Status: Active » Needs review
FileSize
930 bytes

I'm not sure what the right approach to fix this is. Here's one option, skipping the form validation code if the node is being displayed as a preview.

apaderno’s picture

I have the same problem; I was previewing a node created as first user, and the free tags has been replaced by quotation marks.

softrusher’s picture

Patch#1 does not work if the site uses any other language than english because $form_state['values']['op'] is translated. I used ($form_state['clicked_button']['#submit']['0'] != 'node_form_build_preview') now but don't know if its the right way.

Zen’s picture

Version: 6.x-1.0-beta2 » 6.x-1.x-dev
Assigned: Unassigned » Zen
Status: Needs review » Fixed

Fixed with

  if (isset($form_state['values']['taxonomy']) && isset($form_state['values']['taxonomy']['tags']) && $form_state['values']['op'] == t('Save')) {

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

funkytraffic’s picture

The patch in the dev version in fact helps out, but there is an error message, saying:
warning: Invalid argument supplied for foreach() [mywebsitefolder]/modules/taxonomy/taxonomy.module on line 70.

apaderno’s picture

@funkytraffic: Are you sure the error is caused by Unitag?