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've created a mini panel and added it to a node_edit panel which overrides the edit content type form. But when I go to the form the mini panel isn't there. How do I get the mini panel to appear? Am I missing something? Should I 'export' it? On the export tab for the mini panel there is just code, no option to export.
Thanks
Comment | File | Size | Author |
---|---|---|---|
#2 | minipanel.txt | 4.1 KB | LTech |
#2 | node_edit.txt | 23.82 KB | LTech |
Comments
Comment #1
merlinofchaos CreditAttribution: merlinofchaos commentedAn export IS code; you then cut and paste that into the appropriate location.
It's hard to guess why your mini panel might not appear. Is it empty? Is your node edit saved? When you edit a node are you actually getting the panel you've set up?
Can you attach an export of both the node_edit handler you're using and the mini panel?
Comment #2
LTech CreditAttribution: LTech commentedWhen I edit the node I am getting the panel I set up, just not including the mini panel.
Perhaps I didn't add the mini panel correctly. Am I meant to export the code? I've just added 'mini panel' as a content in my node_edit panel.
Comment #3
merlinofchaos CreditAttribution: merlinofchaos commentedAhh, you're passing a node edit context as a required context. Definitely a tricky spot.
Be sure to try this with the latest Panels -dev. At some point I made some fixes to this. If it's still not working with -dev then there may still be a bug there that I missed (or worse, re-introduced).
Comment #4
LTech CreditAttribution: LTech commentedI've tried the latest dev panel there was no change. I don't know if it is a mini panels issue - I'm trying to add node fields forms and they also aren't showing in the edit content form! I ran update.php and I still don't see them. Is this a problem with the ctools upgrade? I also get an error when I try to save the form
Warning: Invalid argument supplied for foreach() in date_combo_validate() (line 498 of /xxx/sites/all/modules/date/date_elements.inc).
There are errors in Leader Years value #1:
The dates are invalid.
But 'Leader Years' isn't a field I have on my form so why am I getting this error!?
(Also on another form where I do have the form 'Leader Years' I don't get the error.
This is very frustrating! What should I do?
Comment #5
merlinofchaos CreditAttribution: merlinofchaos commentedI'm guessing this is a form item that is there but you aren't rendering by putting in an element for it or the 'general form' pane that renders the rest of the form. Just because you don't render the form bits does not mean that form api did not place them there. You need to have this or the form will not work properly. There's no way for Panels to remove form items, and the error you received is exactly why. Form items must be removed using hook_form_alter to set the #access to FALSE -- that will usually prevent these items from validating improperly.
Comment #6
LTech CreditAttribution: LTech commentedWhy are the node fields not showing up in the form?
Comment #7
merlinofchaos CreditAttribution: merlinofchaos commentedThere is a 'general form' pane that you have to put in. THat will render every form item you didn't already render.