Closed (fixed)
Project:
Bibliography Module
Version:
6.x-1.7
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
22 Oct 2009 at 23:19 UTC
Updated:
6 Nov 2009 at 19:10 UTC
When I go to node/add/biblio and select a "Publication type" from the drop-down box, I get the error message "A page with this name already exists". The message links to a completely unrelated node on my site. I only get the error once I select a publication type, and no matter what type I select the error points to the same node. The only thing remarkable about the linked node is that it has no title - its title is set by the auto_nodetitle module. I would assume that this is a contributing factor. Help? :)
Comments
Comment #1
rjerome commentedI haven't seen this before, and I believe you are correct in thinking that the auto_nodetitle module is causing the problem, although I surprised that it would be complaining so early in the process. When you select a "Publication type", what happens is the form is submitted, but it fails validation and it is rebuilt with all the appropriate fields on it.
Is there some reason you can't give that other (exiting) node a title?
Ron.
Comment #2
rjerome commentedI just looked at the auto_nodetitle module, and I don't think it's going to be compatible with biblio since the title of the Publication is stored in the node->title field, so you really don't want that module messing with the title.
Comment #3
danepowell commentedI only apply auto_nodetitle to a completely different content type, not to Biblio nodes. Unless auto_nodetitle is intercepting a hook call or something, would the issue simply be that some node titles are empty and at the point where the form is getting submitted for validation that node title is empty as well?
Comment #4
rjerome commentedI installed that module on my dev machine and it seems to work OK for me (disabled for Biblio content types OR Enabled only if title is blank).
If you are having this error when Auto Nodetitle is disabled for Biblio node types, then I would say it's a but with the Auto Nodetitle module.
Ron.
Comment #5
danepowell commentedOkay, I nailed it down - the problem is generally related to the Wikitools module, which forces nodes of selected types to have unique titles. Since Biblio nodes and the content type of the other node were both selected as "wiki"-type by that module, they were forced to have unique titles, and since the linked type had no title and the new Biblio node obviously had no title yet- bam, error. I simply deselected biblio nodes as wiki to fix the error.
It seems that we shouldn't be submitting the form for validation at this point since there's really not much to validate - we certainly shouldn't be validating the title yet - but I'll understand if you just consider this a fringe-case problem and call it "won't fix".
Comment #6
rjerome commentedThis form is essentially a "Multi-Step" form, i.e. the first step is to choose the type, then the complete form is built based on the chosen type so it's hard to avoid the initial validation step since this is where the multi-step magic occurs.
Ron.
Comment #7
danepowell commentedI understand - unless more people come forward with similar problems I'll just consider this fixed. I don't think it's really Biblio's fault anyway. On that tangential note, it would really help if error messages in Drupal would also mention the module that generated them! Maybe I'll open a separate issue somewhere on that...
Comment #8
rjerome commentedThat's a good idea, and depending on how that error was generated debug_backtrace() could be used to identify the file that generated it, much like drupal_error_handler does.
Ron.