Download & Extend

Change in input format destroys php code

Project:Drupal core
Version:6.20
Component:php.module
Category:support request
Priority:normal
Assigned:Unassigned
Status:active

Issue Summary

Not sure if this is the right issue forum.

I added a new field to the page content type. The default input format was PHP code so I could add an include statement to some pages.

Unfortunately while fooling around with settings I must have changed the input format to plain text or something. The result was that I lost the php statements in the pages. This cost me a couple of hour's work.

It would have been great if there had been a warning statement saying something like Changing Format Will Zap Your Code!!!

Thanks

Comments

#1

Project:CCK Field Definitions» Drupal core
Version:6.x-1.x-dev» 6.20
Component:User interface» php.module
Category:bug report» support request

Changing your input format does not change the contents of the node. Your code just doesn't get evaluated. Try editing the node and see if your code is still there.

In any case, embedding PHP code within a node is not necessarily a good practice; you might want to try building a custom module: http://drupal.org/node/231276