Until now, Node Relationships has been using the following path to render the node edit form on child Modal Frames:
- noderelationships/create/[referrer_type]/[field_name]/[new_type]
This may cause issues with other modules, as seen on this issue related to Hierarchical Select: #582508: HS + noderelationships + modal frame api
The problem is that some modules may rely on the node/add path to perform their job, because they "watch" for this particular path, or because the menu system will automatically load node.pages.inc.
If we can tweak enough the output of node/add so that it can be rendered on a Modal Frame keeping the context information that we need to perform our own job, then we'll probably solve compatibility issues with other modules.
Patch coming...
Comments
Comment #1
markus_petrux CreditAttribution: markus_petrux commentedBetter title.
Comment #2
markus_petrux CreditAttribution: markus_petrux commentedOk, committed to CVS.
http://drupal.org/cvs?commit=307242
Comment #3
markus_petrux CreditAttribution: markus_petrux commentedUgh! It seems there are cases where the Modal Frame remains open with the loading animation in an endless loop. This is because this patch fails to check a few cases where the child stuff of the Modal Frame should be triggered.
I'm marking this critical because I just released a new version with these changes. :(
I'll try to work on a patch as soon as possible. Sorry for the headaches it may cause.
Comment #4
markus_petrux CreditAttribution: markus_petrux commentedOk, fix committed to CVS. It was just the call to include Modal Frame stuff in the child window for the node add form that had to be done within the pre_render callback so that the form is rendered correctly in case of validation errors, where hook_form_alter() is not involved.
http://drupal.org/cvs?commit=308346
Again, apologies for the headaches this issue could have caused to you all.
I'm going to create a new release in a moment.
Comment #5
markus_petrux CreditAttribution: markus_petrux commentedIt seems the fix above was not completely correct. :(
Here's a follow up patch. This time, I'm calling modalframe_child_js() from noderelationships_init(), and I hope this fixes the issue, finally.
http://drupal.org/cvs?commit=309460
This time, though, I'll wait a little to see if someone else can confirm the fix before creating a new release.
Comment #6
markus_petrux CreditAttribution: markus_petrux commentedFYI: Here's how to identify when a node/add page is being loaded within a modal frame implemented by Node Relationships module. The path looks like this:
Comment #8
AgaPe CreditAttribution: AgaPe commentedHi Markus,
I would like to apply your patch but i am unfamiliar with cvs, could you please tell me which one should i apply?
under dates there are different links, plus there are different link under different dates and as i see newer patches add something but they do not contain the previous ones so i got a bit lost seeing http://drupal.org/cvs?file=/modules/noderelationships/CHANGELOG.txt
Comment #9
AgaPe CreditAttribution: AgaPe commentedOh yea i see these are different files, i checked the patch from #5 but it was already included in the module, so why the hs is not working?
Comment #10
AgaPe CreditAttribution: AgaPe commentedAdded the patches from 18th and 25th Jan but HS in the Modal Frame is not working still...
Would be very thankful for any help!