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

CommentFileSizeAuthor
#2 minipanel.txt4.1 KBLTech
#2 node_edit.txt23.82 KBLTech
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

merlinofchaos’s picture

An 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?

LTech’s picture

FileSize
23.82 KB
4.1 KB

When 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.

merlinofchaos’s picture

Ahh, 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).

LTech’s picture

I'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?

merlinofchaos’s picture

I'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.

LTech’s picture

Why are the node fields not showing up in the form?

merlinofchaos’s picture

There is a 'general form' pane that you have to put in. THat will render every form item you didn't already render.