michaeluno / admin-page-framework

Facilitates WordPress plugin and theme development.
http://admin-page-framework.michaeluno.jp/
Other
337 stars 71 forks source link

Adding setting fields into the meta box doesn't work! #216

Closed mnajafzadeh closed 9 years ago

mnajafzadeh commented 9 years ago

Hello,

$this->addSettingFields does not add any setting fields into the meta box. Using WordPress 4.2.3 over Windows 2008 server.

Do you know any possible problem?

michaeluno commented 9 years ago

Hi,

Do you see form fields in the demo?

  1. Activate the loader plugin (http://downloads.wordpress.org/plugin/admin-page-framework.latest-stable.zip).
  2. Activate the demo in the plugins.php page.
  3. Go to Dashboard -> Demo -> Add New.
mnajafzadeh commented 9 years ago

When I try to access this "page /wp-admin/admin.php?page=apfl_addons", I get an "500 - Internal server error." I activated Demo finally but, I have access to this page "/wp-admin/edit.php?post_type=apf_posts" but, when I click on "Add New", in the "Add New APF Post", I see no fields under any sections. Take a look at this picture. add_new_apf_post-2015-07-25 I have access to "/wp-admin/edit.php?post_type=apf_posts&page=apf_builtin_field_types" and I can seen all the fields correctly but, no fields exists for post types. I think this problem could be related to MetaBox or PostType class as I don't have fields only under post types.

Thank you in advance.

michaeluno commented 9 years ago

Do you see fields in the other demo pages, Dashboard -> Demo -> Built-in Field Types, Dashboard -> Demo -> First Page?

mnajafzadeh commented 9 years ago

Yes, I can see fields in "Dashboard -> Demo -> Built-in Field Types" and "Dashboard -> Demo -> First Page" both. I can't see in "Dashboard -> Demo -> Add New" !!! I could be related to post types. Is there any kind of requirements? I am using PHP V5.3.2 and WP V4.2.3.

michaeluno commented 9 years ago

Try to see if the same problem occurs by creating a test site only with the loader plugin.

mnajafzadeh commented 9 years ago

The plugin works well on my Linux assembled server with no problem. The problem is on my Windows 2008 server where I see no fields. Is there any required configuration for PHP or something else that Admin Page Framework is using?

michaeluno commented 9 years ago

Has any error log been generated?

mnajafzadeh commented 9 years ago

No, there is no error log generated anywhere.

michaeluno commented 9 years ago

Can you check if the automatic updates work?

  1. Go to Dashboard -> Plugins -> Installed Plugins -> Admin Page Framework - Loader -> Edit.
  2. Change this part Version: 3.5.11 to Version: 3.5.11b.
  3. You should get an update notice and update the plugin.

This checks whether the OS can properly copy and read files. Let me know if it successfully updates. If it fails, post the error message.

mnajafzadeh commented 9 years ago

I did the change but, I did not get any update notice! But, I have downloaded the V3.5.11b from project branches. Can I replace the installation with the new one?

michaeluno commented 9 years ago

The plugin file downloaded from GitHub has a different directory name from the one hosted on wordpress.org. If the directory name is different, the plugin will not receive automatic updates. So uninstall the current loader plugin if it is downloaded from GitHub and install one from wordpress.org. Here old files are listed: https://wordpress.org/plugins/admin-page-framework/developers/

Try this previous version v3.5.10 (https://downloads.wordpress.org/plugin/admin-page-framework.3.5.10.zip) so that you don't have to modify the version number.

mnajafzadeh commented 9 years ago

I did it. Successfully updated with no error.

michaeluno commented 9 years ago

With that updated plugin, can you check if demo fields are displayed? Also you said you got an error in the page, page /wp-admin/admin.php?page=apfl_addons. Do you still get the same error?

mnajafzadeh commented 9 years ago

I checked the dome fields, still no fields over there. The /wp-admin/admin.php?page=apfl_addons page is also still showing the same error. I did the check with the upgraded version.

mnajafzadeh commented 9 years ago

Just in case, I encountered the same issue (no meta data fields for post types), when I install the Admin Page Framework loader plugin on WPMU on all different type of server. I fixed this with a simple trick. I installed the loader plugin from network admin but, activate the plugin separately in each website not in the network admin.

michaeluno commented 9 years ago

Does the problem only occur on multisites or does it occur also on a single site?

mnajafzadeh commented 9 years ago

The problem occurs on all websites. The only way to get it to work is to activate the loader plugin on each website separately. If you network activate the plugin, it will not work and the fields will not be shown on the demo pages. Try yourself and install the loader plugin on WPMU and network activate it.

michaeluno commented 9 years ago

It is not clear. I'm asking whether the problem only occurs on multisites. Or does it occur on a single site installation (not multisite) also?

For your information, in my environment no such issue occurs.

mnajafzadeh commented 9 years ago

No, it occurs on multi-site and single installation both. In another word, it occurs when you use WP multi-site version.

michaeluno commented 9 years ago

To eliminate the possibilities of plugin and theme conflicts, try a clean install. Install a test site with only the loader plugin and the default theme in case you haven't done it yet.

michaeluno commented 9 years ago

Closing the topic due to inactivity.

mnajafzadeh commented 9 years ago

Yes. it looks, it is conflicting with another plugin or theme on our website. Can you give us a suggestion of some possible plugins that may be conflicting with Admin Page Framework?

michaeluno commented 9 years ago

Try installing and activating the plugins and the theme one by one on the clean-installed test site. At some point, the problem should start occurring. Then you can tell which one is the cause.

mnajafzadeh commented 8 years ago

Hello, I have found the plugin that is causing this problem. It is:

WR MegaMenu, https://wordpress.org/plugins/wr-megamenu/

When I deactivate this plugin everything work fine. Could you help me with a patch or any solution? Thank you.