pods-framework / pods

The Pods Framework is a Content Development Framework for WordPress - It lets you create and extend content types that can be used for any project. Add fields of various types we've built in, or add your own with custom inputs, you have total control.
https://pods.io/
GNU General Public License v2.0
1.07k stars 264 forks source link

Support: Pod CPT not found - Multisite/Registration Issue #4868

Closed GaryJones closed 6 years ago

GaryJones commented 6 years ago

New CPT Pod not appearing.

Installed Pods on multisite, then single-site activated on site 2. Went to Pods Admin -> Add New, and tried to add a Conference/Conferences CPT. Next screen showed Pod Not Found.

Pods Package Export can't happen, because it's not seeing anything added. Trying to amend the Existing Post Types doesn't show it there either.

Trying to add the Pod again, throws a JS error about not being able to re-use that name: "Error: Pod using already exists, you can not reuse an object across multiple pods". I don't have any other CPTs, pages, posts, taxonomy terms etc. with that name, since it's a fresh site. I also tried with Test and got the same behaviour.

Clearing the Pods Cache has no effect. Pods is not active on site 1.

WordPress Environment

``` WordPress Version: 4.9.5 PHP Version: 7.1.16 MySQL Version: 5.6.36 Server Software: Apache Your User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.181 Safari/537.36 Session Save Path: /tmp Session Save Path Exists: Yes Session Save Path Writeable: Yes Session Max Lifetime: 1440 Opcode Cache: Apc: No Memcached: No OPcache: Yes Redis: No Object Cache: APC: No APCu: No Memcache: No Memcached: Yes Redis: No WPDB Prefix: wp_2_ WP Multisite Mode: Yes WP Memory Limit: 64M Pods Network-Wide Activated: No Pods Install Location: /home/{redacted}/public_html/wp-content/plugins/pods/ Pods Tableless Mode Activated: No Pods Light Mode Activated: No Currently Active Theme: Authority Pro Currently Active Plugins: Antispam Bee: 2.7.1 Disable Emojis: 1.7 Disable XML-RPC: 1.0.1 Genesis Ignore Deprecated: 1.0.0 GistPress: 3.0.1 GitHub Updater: 5.3.4.5 ManageWP - Worker: 4.5.0 MonsterInsights Pro: 6.2.4 Pods - Custom Content Types and Fields: 2.7.1 Scriptless Social Sharing: 2.0.1 SG Optimizer: 4.0.5 SyntaxHighlighter Evolved: 3.2.1 SyntaxHighlighter Evolved - Spacegray: 1.0.2 WP Rocket: 3.0.4 Yoast SEO Premium: 7.3 YOURLS Link Creator: 2.1.1 ```
jimtrue commented 6 years ago

@GaryJones Are you Network Admin or regular Admin? I also see the note above that:

Pods Network-Wide Activated: No

Just getting clarification before they dig into this one.

GaryJones commented 6 years ago

Are you Network Admin or regular Admin?

Network admin. I installed the plugin on the site.

I also see the note above that: Pods Network-Wide Activated: No Just getting clarification before they dig into this one.

It's not Network activated because I don't currently want or need the plugin on the other site, and it shouldn't be a requirement for it to work correctly on site 2 and above.

GaryJones commented 6 years ago

Network activating, and trying to register Test2 and Test3 CPTs on site 1 and site 2, both fail as before:

screenshot 2018-04-30 20 02 01

Is Pods not network compatible?

jimtrue commented 6 years ago

As I indicated, this was to make sure we had the right information and configuration details for your setup. I do believe if the plugin is on Network site, it does require you to be Network Admin or for you to provide Capabilities to regular Admins in order to use it. This is not unusual for plugins that are capable of Network activation with Network settings.

GaryJones commented 6 years ago

Still getting the same with Pods 2.7.8.

jimtrue commented 6 years ago

This didn't have any work against it, so it would still be broken unless there was a PR out there.

GaryJones commented 6 years ago

Twenty Seventeen, no plugins, no mu-plugins, no drop-ins.

Activating on blog 2, and the same error occurs.

Deactivating and Delete Pods Data.

Network activating, and still the same error when adding new pod on blog 2, or blog 1.

``` WordPress Version: 4.9.7 PHP Version: 7.1.20 MySQL Version: 5.6.36 Server Software: Apache Your User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.75 Safari/537.36 Session Save Path: /tmp Session Save Path Exists: Yes Session Save Path Writeable: Yes Session Max Lifetime: 1440 Opcode Cache: Apc: No Memcached: No OPcache: Yes Redis: No Object Cache: APC: No APCu: No Memcache: No Memcached: Yes Redis: No WPDB Prefix: wp_2_ WP Multisite Mode: Yes WP Memory Limit: 64M Pods Network-Wide Activated: Yes Pods Install Location: /home/azzag901/public_html/wp-content/plugins/pods/ Pods Tableless Mode Activated: No Pods Light Mode Activated: No Currently Active Theme: Twenty Seventeen Currently Active Plugins: Pods - Custom Content Types and Fields: 2.7.8 ```

wp_2_podsrel table is empty. wp_2_options only has entries for component settings, and framework and db versions.

wp_2_posts does seem to record the pods post type registration:

  ID post_author post_date post_date_gmt post_content post_title post_excerpt post_status comment_status ping_status post_password post_name to_ping pinged post_modified post_modified_gmt post_content_filtered post_parent guid menu_order post_type post_mime_type comment_count
  9707 2 2018-08-01 15:29:03 2018-08-01 14:29:03   Tests   publish closed closed   test     2018-08-01 15:29:03 2018-08-01 14:29:03   0 https://garyjones.io/?post_type=_pods_pod&p=9707 0 _pods_pod   0

So it seems that this can't be read for some reason.

GaryJones commented 6 years ago

I reactivated a bunch of plugins, and oddly, the pods now show, but can't be edited or deleted:

screenshot 2018-08-01 15 59 36

The plugins I reactivated were:

Antispam Bee: 2.8.1 Diagnosis: 3.0.0 Disable Emojis (GDPR friendly): 1.7.2 Disable XML-RPC: 1.0.1 Genesis Ignore Deprecated: 1.0.0 GistPress: 3.0.1 MonsterInsights Pro: 6.2.4 Presenter: 1.2.0 Query Monitor: 3.1.0 Scriptless Social Sharing: 2.1.1 SG Optimizer: 4.0.7 SVG Support: 2.3.15 SyntaxHighlighter Evolved: 3.2.1 SyntaxHighlighter Evolved - Spacegray: 1.0.2 WordPress Importer: 0.6.4 WP Rocket: 3.0.5.1 Yoast SEO Premium: 7.9 YOURLS Link Creator: 2.1.1

Disabling them again and trying to edit / delete a Pod still fails.

GaryJones commented 6 years ago

Debugging, and it seems that by the end of the PodsUI::__construct() method, the $this->pod is still false.

$this->pods_data is a PodsData object.

However, at the point of deletion, $this->sql['table'] appears to be null.

GaryJones commented 6 years ago

My $this->pods_data, which is what $this->sql is populated from, is populated here - which calls pods_data(), but that still has $this->pod as null (which then fails the strict check against false etc.).

GaryJones commented 6 years ago

After disabling some Static, Dynamic and Memcached caching for SiteGround, and installing the Pods Alternative Cache, Pods currently seems to be working as intended.