Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I would suggest to set the default value to '' instead 0 see line 37:
31 function refresh_form_node_form_alter(&$form, $form_state) {
32 if (isset($form['#node']->refresh)) {
33 $refresh = $form['#node']->refresh;
34 }
35 else {
36 $refresh = '';
37 }
Reason: if it is 0 during creating new pages the value must be set to a number or to '' otherwise it is impossible to save the page. The User do not know why the page will not be saved (also if the error is shown) if the module will be installed on a working page.
Knut
Comments
Comment #1
valderama CreditAttribution: valderama commentedI fully agree! Would be great to see this change comitted..
Thanks!
Comment #2
dwalker51 CreditAttribution: dwalker51 commentedAgreed...Its getting tiresome having to change the 0 to "".
Comment #3
mo6Makes sense. Comitted.
Comment #4
mo6Fixed in the 7.x-1.1 release.