Closed (fixed)
Project:
AI Auto-reference
Version:
1.0.x-dev
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
15 Feb 2024 at 21:53 UTC
Updated:
12 Dec 2025 at 13:04 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
andreastkdf commentedComment #4
andreastkdf commentedThe MR below should fix the issue. Adding a check that the node ID exists (which doesn't in the case of node creation) to avoid calling
$node->toUrl()without an existing ID.Comment #6
scott_euser commentedThanks for this! Added a comment, not 100% sure if NW or not, a bit of a question more - perhaps you can check and screenshot or screencast a new node creation with the patch applied to make sure that continues to work.
Comment #7
andreastkdf commentedAdding a screen recording of the bug for reference.
see error log on issue description.
Comment #8
scott_euser commentedAha, so actually that should be fine; its not a real submit of this action and looking at https://git.drupalcode.org/project/ai_auto_reference/-/blob/1.0.x/ai_aut... we are only allowing generate button when Node ID is already known
Comment #10
scott_euser commentedComment #11
scott_euser commentedThanks!
Comment #12
andreastkdf commentedActually, I just checked #8 (with the patch applied fyi) but the button is showing on new node and more importantly the core save button doesn't work at all. not sure if this should be a different new issue.
see screen record:

Comment #13
scott_euser commentedI can't seem to reproduce that, will need to have more steps, going to mark as postponed for now.
Comment #14
todor nikolov commentedI encountered the same issue when using the module. I ended up disabling the module for node "add/create" pages, because even if I fix the issue, the "Generate references with AI" button did not work for me. The module works fine on the "edit" pages of nodes. I think that generally the module won't work on the "add/create" node pages, because it redirects you which would then lose all of your progress. So as a temporary solution, you can use this patch to disable the module entirely on new nodes and use it once the node has been saved/created.
Comment #15
scott_euser commentedApplied your patch. Will have to figure out how to sort, but patch at least makes it not broken for now thanks!
Comment #16
todor nikolov commentedI just updated the module to the latest version (as of this message - 1.0.0-rc3) and I see that the changes from my patch have been added to the module. I'm leaving this comment for anyone who used this patch and is wondering why it's not applying on the newest module version.
Comment #17
scott_euser commentedVery true! This should be marked as 'Fixed' not 'Postponed', sorry!