Closed baskettcase closed 9 years ago
The problem seems to be in the load_aic_locations(). The $oAdminPage->addSettingSections() and $oAdminPage->addSettingFields() are not actually displaying anything for the aic_locations slug page. It does for the aic_flavors page though. And like I said if I remove the aic_flavors page from the menu, then the locations page works. Some kind of conflict it seems, but I can't figure out why.
I cannot tell what's wrong unless I see the other files, locations.php
and flavors.php
. Can you post them? (If they are long, make them short enough to see the problem)
I emailed you on your website since Im not sure it's ok to post all the code here. Hopefull you're able to get it. I wasn't sure how to send you a private message here on github.
Try not omitting the target page slug in the addSettingSections()
method.
$oAdminPage->addSettingSections(
'aic_locations', // <-- this one, the target page slug
array(
'section_id' => '...',
'title' => '...',
),
Ugh, sure enough that was it. Now everything is working. Thank you!
Glad it helped and thanks for the donation!
I'm really struggling with this framework for some reason. I'm sure I'm missing something simple. For example, I have two pages and the second page will not show the form fields, yet the first page will. If I remove the first submenu then the second one works. I add it back and it doesn't work anymore. I've tried making it two different classes outside of the core, but still, nothing on the second submenu page, although the submit button shows up. Is it even possible to do two different pages of options and each page saves it's own option variable?
Ill do a quick bit of code for a fun test:
So that's the core part, it saves the options in the database as the slug which that works fine. The flavors.php shows up just fine, yet the locations does not. If I remove the addSubMenuItems for flavors then the locations does show up. Im missing something and I can't figure out what.