Creates form errors throughout the site
bob-hinrichs - March 30, 2009 - 19:48
| Project: | Node Expire |
| Version: | 6.x-2.03 |
| Component: | Code |
| Category: | bug report |
| Priority: | critical |
| Assigned: | Unassigned |
| Status: | active |
Jump to:
Description
Hi, thanks for this module.
There are potentially 'You must submit a valid date.' form errors on the submission of any node content on the site due to this module. This is because _node_expire_form_node_type_form_alter_submit inserts values for the node type into the variable table whenever a node type is edited. This table is checked for the existence of values for a node type when the node_expire module acts on the node, in node_expire_nodeapi, and the error is thrown in _node_expire_nodeapi when there is no expiration date submitted for the node. This creates errors when nodes are submitted that are not supposed to be managed by this module.

#1
As a quick fix, I added the following code to node_expire.module, node_expire_nodeapi line 90:
if (!$ntypes[$node->type]['default']){return;
}