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.
When I try to create a new content type I get this issue.
Fatal error: Call to undefined function _protected_node_node_type_validate() in \includes\form.inc on line 1432
If I disable protected_node, It will work properly.
What can I do?
Comment | File | Size | Author |
---|---|---|---|
#15 | protected_node-valdation-function-undefined-fix-1538250-15.patch | 918 bytes | maxlmator |
#1 | new_content_unrpotected_type-1538250-1.patch | 1.54 KB | idflood |
Comments
Comment #1
idflood CreditAttribution: idflood commentedI quickly stumbled upon this issue after configuring the module. Here is a simple patch that should fix the issue. It makes the assumption that if $node->protected_node_is_protected is not set then the node type is configured to "never protected".edit: wrong issue...
Comment #2
idflood CreditAttribution: idflood commentedComment #3
Syd Barrett CreditAttribution: Syd Barrett commentedSo?is it the right patch or not?
Comment #4
idflood CreditAttribution: idflood commentedNop sorry : /
It was for #1479098: Error when a content type is set to Never Protected
Comment #5
Syd Barrett CreditAttribution: Syd Barrett commentedOk, thanks anyway :)
Comment #6
zilverdistel CreditAttribution: zilverdistel commentedHi Syd,
I couldn't get to reproduce this error on a fresh drupal installation, with only protected_node installed (and some basic dev modules like views ..).
Also, since there's no data loss involved with this bug, priority isn't critical.
Greetz,
Diederik
Comment #7
Syd Barrett CreditAttribution: Syd Barrett commentedThank you zilverdistel,
Probably is a conflict with some other module. I will give you more information once I got it.
Thank you.
Comment #8
avantwaves CreditAttribution: avantwaves commentedSame problem here... the error that I get is:
PHP Fatal error: Call to undefined function _protected_node_node_type_validate() in /httpdocs/includes/form.inc on line 1443
I am trying to solve the problem... (I don't know exactly how xD ) and I will report back.
Comment #9
bluewallmedia CreditAttribution: bluewallmedia commentedWhen this error exists, and you go to configure the module here....
http://mysite.com/admin/config/content/protected_node
My drupal install returned this error...
Fatal error: Call to undefined function _user_password_dynamic_validation() in /mysite/sites/all/modules/protected_node/protected_node.settings.inc on line 297
I can also confirm that by un-installing this module fixes the issue with not being able to create a content type in Drupal 7.14.
I'm happy to test any patches for D7.
Comment #10
akolahi CreditAttribution: akolahi commentedI'm having the same error message as #9 when i try to visit admin/config/content/protected_node
***edit***
I just noticed that i can add a new content type, but I still can't visit the admin page (admin/config/content/protected_node) so my issue may be different.
Comment #11
rgme CreditAttribution: rgme commentedI have had both problems mentioned in this issue, and here are the solutions/bandages I am using. Please let me know if I'm messing things up by doing this (especially #2). I don't know how to do the whole patching thing, so I'll just describe what I did. (Not the most graceful solutions, but they seem to get the job done.)
Looking in protected_node_settings.inc, it looks like this function works with the default password feature. I don't really need this feature, so I commented out line 737:
$form['#validate'][] = '_protected_node_node_type_validate';
Since I messed with the feature, I just took it out, from lines 714-722:
I can create and edit content types without errors. I hope everything behind the scenes is still working.
This one is documented here, with solutions in comments #1 and #7. Basically, comment out/delete line 297.
Again, please let me know if these things will mess up any functionality/database stability. So far it seems to work for me.
Comment #12
hugronaphor CreditAttribution: hugronaphor commentedIn my case I can't edit any Content Types with enabled module `node location` from location module (http://drupal.org/project/location ).
Commented line 737 ( $form['#validate'][] = '_protected_node_node_type_validate'; ) , seems to fix that.
Comment #13
GrimreaperHello,
I have just tested a fresh installation as zilverdistel and I don't have any bug.
I also test the problem in comment #12. I don't have any bug.
Maybe those problems where fixed between the moment you reported its and now ?
Comment #14
izus CreditAttribution: izus commentedi cannot reproduce it too
closing as maybe this was fixed meanwhile
Comment #15
maxlmator CreditAttribution: maxlmator commentedI ran into the same issue and was able to create a fix that does not skip the validation altogether.
Instead of using
module_load_include()
,form_load_include()
will ensure that thesettings.inc
is always included when the form is loaded.This does fix this error for me and is probably also generally the better way to include the settings.inc?
(This is my first comment / patch and I hope, it's done correctly.)
Comment #16
GrimreaperHello,
I'm sorry but I just make a fresh install of a last version of Drupal with the last code base of the module. And I don't have any error.
So I don't test your patch, even if I think it will not break anything.
Please could you give simple steps to reproduce the error.
Thanks
Comment #17
maxlmator CreditAttribution: maxlmator commentedI can reproduce it, when having
location_node
installed and enabled as #12 already mentioned.Steps to reproduce:
location
andlocation_node
The error message:
Fatal error: Call to undefined function _protected_node_node_type_validate() in <Drupal-Dir>/includes/form.inc on line 1471
I'm well aware of the chance that this problem might be caused by the location module but I wasn't able to pinpoint it to any specific call there.
Comment #18
GrimreaperOk thank you, I forget the location project mentionned in the comments.
I refresh the title and tags of the issue to be more self-expressive.
I will try your patch between today and the end of the weekend.
Comment #19
GrimreaperI can reproduce the bug.
I test the patch and it solves the problem.
BUT : I also notice that the maintainer of location said that the modules :
node locations,
user locations
(and I think probably location taxonomy, why not all the entities)
are deprecated and it is location CCK (which will become location field) which is to be used.
I test without applying your patch with location CCK and it works.
Also I can't see how node locations, etc. works because I don't see any config options added anywhere. I think those modules are still present only for transition and they will be removed soon.
So I don't know, if the maintainer wants to merge your patch ok, if not, I think the issue is closed.
Comment #20
maxlmator CreditAttribution: maxlmator commentedThanks for pointing out the roadmap of the location module. I wasn't aware of it.
However, leaving the location module aside I still think that
form_load_include()
is the better way for dealing with includes in Drupal forms.Like the documentation already says:
Maybe it's better to start a separate ticket and discussion for this?
Comment #21
GrimreaperI think it will be merged in this issue. There is no need to open a new one.
Thanks.
Comment #22
izus CreditAttribution: izus commented#15 is merged in 7.x-1.x
Thank you all