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

Changing CPT Slug creates duplicate in admin menu that's not editable in Pods. #6258

Closed Cskyleryoung closed 3 years ago

Cskyleryoung commented 3 years ago

Description

Post 2.8 (which is awesome!) I tried changing a CPT slug. The results was two of the same post types showing up in the admin menu, but still only one in the Pods list of editable CPTs. There was no obvious way to edit or remove the CPT with the original slug.

Testing instructions

  1. Create a CPT, for example News Letter PDF (news_letter_pdf).
  2. Click into the CPT to edit it.
  3. Click on "Edit" in the "Edit Pod:" section at the top of the editor.
  4. Change the slug to something else, like "newsletter_pdf".
  5. There should be a second CPT called "News Letter PDF" in the Wordpress Admin menu on the left side of your screen.

Expected behavior

I would expect that changing a CPT slug would simply update the slug, without creating a duplicate, let alone an un-editable one.

Pods version

2.8

Other super helpful information

WordPress Environment ``` ` ### wp-core ### version: 5.8.1 site_language: en_US user_language: en_US timezone: America/Los_Angeles permalink: /%postname%/ https_status: true multisite: false user_registration: 1 blog_public: 1 default_comment_status: open environment_type: production user_count: 3741 dotorg_communication: true ### wp-paths-sizes ### wordpress_path: /www/gematria_653/public wordpress_size: 93.17 MB (97697770 bytes) uploads_path: /www/gematria_653/public/wp-content/uploads uploads_size: 195.58 MB (205079410 bytes) themes_path: /www/gematria_653/public/wp-content/themes themes_size: 84.21 MB (88298199 bytes) plugins_path: /www/gematria_653/public/wp-content/plugins plugins_size: 159.03 MB (166751288 bytes) database_size: 1.40 GB (1504886784 bytes) total_size: 1.92 GB (2062713451 bytes) ### wp-active-theme ### name: Site Savvy / Beaver Builder Child Theme (gen-bb-theme-child) version: 1.0 author: The Beaver Builder Team author_website: https://sitesavvy.systems parent_theme: Beaver Builder Theme (bb-theme) theme_features: core-block-patterns, woocommerce, post-formats, widgets-block-editor, post-thumbnails, fl-theme-builder-headers, fl-theme-builder-footers, fl-theme-builder-parts, automatic-feed-links, title-tag, align-wide, wp-block-styles, html5, menus, wc-product-gallery-zoom, wc-product-gallery-lightbox, wc-product-gallery-slider, widgets theme_path: /www/gematria_653/public/wp-content/themes/gen-bb-theme-child auto_update: Disabled ### wp-parent-theme ### name: Beaver Builder Theme (bb-theme) version: 1.7.9 author: The Beaver Builder Team author_website: http://www.wpbeaverbuilder.com/?utm_medium=bb-pro&utm_source=bb-theme&utm_campaign=themes-admin-page theme_path: /www/gematria_653/public/wp-content/themes/bb-theme auto_update: Disabled ### wp-themes-inactive (1) ### Twenty Twenty-One: version: 1.4, author: the WordPress team, Auto-updates enabled ### wp-mu-plugins (1) ### Kinsta Must-use Plugins: version: 2.3.1, author: Kinsta Team ### wp-plugins-active (29) ### Akismet Anti-Spam: version: 4.2.1, author: Automattic, Auto-updates enabled Beaver Builder Plugin (Pro Version): version: 2.5.0.2, author: The Beaver Builder Team, Auto-updates enabled Beaver Themer: version: 1.3.3.1, author: The Beaver Builder Team, Auto-updates enabled CartFlows: version: 1.7.1, author: CartFlows Inc, Auto-updates enabled CartFlows Pro: version: 1.7.2, author: CartFlows Inc, Auto-updates enabled Custom Adobe Fonts (Typekit): version: 1.0.18, author: Brainstorm Force, Auto-updates enabled Formidable Forms: version: 5.0.11, author: Strategy11, Auto-updates enabled Formidable Forms Pro: version: 5.0.09, author: Strategy11 (latest version: 5.0.11p), Auto-updates enabled Formidable MailChimp: version: 2.06, author: Strategy11, Auto-updates enabled Formidable Registration: version: 2.04, author: Strategy11, Auto-updates enabled Mailgun: version: 1.7.9, author: Mailgun, Auto-updates enabled Manage Notification E-mails: version: 1.8.0, author: Virgial Berveling, Auto-updates enabled Pods - Custom Content Types and Fields: version: 2.8.3, author: Pods Framework Team, Auto-updates enabled Pods Beaver Themer Add-On: version: 1.3.6, author: Quasel, Pods Framework Team, Auto-updates enabled Printful Integration for WooCommerce: version: 2.1.25, author: Printful, Auto-updates enabled Rank Math SEO: version: 1.0.75, author: Rank Math, Auto-updates enabled Safe SVG: version: 1.9.9, author: Daryll Doyle, Auto-updates enabled User Menus: version: 1.2.7, author: Code Atlantic, Auto-updates enabled WooCommerce: version: 5.8.0, author: Automattic, Auto-updates enabled WooCommerce Admin: version: 2.7.2, author: WooCommerce, Auto-updates enabled WooCommerce Memberships: version: 1.22.7, author: SkyVerge, Auto-updates enabled WooCommerce Menu Cart: version: 2.10.1, author: Jeremiah Prummer, Ewout Fernhout, Auto-updates enabled WooCommerce Name Your Price: version: 3.3.2, author: Kathy Darling, Auto-updates enabled WooCommerce Shipping & Tax: version: 1.25.19, author: WooCommerce, Auto-updates enabled WooCommerce Stripe Gateway: version: 5.7.0, author: WooCommerce, Auto-updates enabled WooCommerce Subscriptions: version: 3.1.6, author: WooCommerce, Auto-updates enabled WordPress Importer: version: 0.7, author: wordpressdotorg, Auto-updates enabled WP-Stateless: version: 3.1.1, author: UDX, Auto-updates enabled WP Maintenance Mode: version: 2.4.1, author: Designmodo, Auto-updates enabled ### wp-media ### image_editor: WP_Image_Editor_Imagick imagick_module_version: 1690 imagemagick_version: ImageMagick 6.9.10-23 Q16 x86_64 20190101 https://imagemagick.org imagick_version: 3.5.1 file_uploads: File uploads is turned off post_max_size: 128M upload_max_filesize: 128M max_effective_size: 128 MB max_file_uploads: 20 imagick_limits: imagick::RESOURCETYPE_AREA: 122 MB imagick::RESOURCETYPE_DISK: 1073741824 imagick::RESOURCETYPE_FILE: 768 imagick::RESOURCETYPE_MAP: 512 MB imagick::RESOURCETYPE_MEMORY: 256 MB imagick::RESOURCETYPE_THREAD: 1 imagemagick_file_formats: 3FR, 3G2, 3GP, AAI, AI, ART, ARW, AVI, AVS, BGR, BGRA, BGRO, BIE, BMP, BMP2, BMP3, BRF, CAL, CALS, CANVAS, CAPTION, CIN, CIP, CLIP, CMYK, CMYKA, CR2, CRW, CUR, CUT, DATA, DCM, DCR, DCX, DDS, DFONT, DJVU, DNG, DOT, DPX, DXT1, DXT5, EPDF, EPI, EPS, EPS2, EPS3, EPSF, EPSI, EPT, EPT2, EPT3, ERF, EXR, FAX, FILE, FITS, FRACTAL, FTP, FTS, G3, G4, GIF, GIF87, GRADIENT, GRAY, GRAYA, GROUP4, GV, H, HALD, HDR, HISTOGRAM, HRZ, HTM, HTML, HTTP, HTTPS, ICB, ICO, ICON, IIQ, INFO, INLINE, IPL, ISOBRL, ISOBRL6, JBG, JBIG, JNG, JNX, JPE, JPEG, JPG, JPS, JSON, K25, KDC, LABEL, M2V, M4V, MAC, MAGICK, MAP, MASK, MAT, MATTE, MEF, MIFF, MKV, MNG, MONO, MOV, MP4, MPC, MPEG, MPG, MRW, MSL, MSVG, MTV, MVG, NEF, NRW, NULL, ORF, OTB, OTF, PAL, PALM, PAM, PANGO, PATTERN, PBM, PCD, PCDS, PCL, PCT, PCX, PDB, PDF, PDFA, PEF, PES, PFA, PFB, PFM, PGM, PGX, PICON, PICT, PIX, PJPEG, PLASMA, PNG, PNG00, PNG24, PNG32, PNG48, PNG64, PNG8, PNM, PPM, PREVIEW, PS, PS2, PS3, PSB, PSD, PTIF, PWP, RADIAL-GRADIENT, RAF, RAS, RAW, RGB, RGBA, RGBO, RGF, RLA, RLE, RMF, RW2, SCR, SCT, SFW, SGI, SHTML, SIX, SIXEL, SPARSE-COLOR, SR2, SRF, STEGANO, SUN, SVG, SVGZ, TEXT, TGA, THUMBNAIL, TIFF, TIFF64, TILE, TIM, TTC, TTF, TXT, UBRL, UBRL6, UIL, UYVY, VDA, VICAR, VID, VIFF, VIPS, VST, WBMP, WEBP, WMF, WMV, WMZ, WPG, X, X3F, XBM, XC, XCF, XPM, XPS, XV, XWD, YCbCr, YCbCrA, YUV gd_version: 2.3.0 gd_formats: GIF, JPEG, PNG, WebP, BMP, XPM ghostscript_version: unknown ### wp-server ### server_architecture: Linux 5.4.0-1049-gcp x86_64 httpd_software: nginx/1.21.3 php_version: 7.4.25 64bit php_sapi: fpm-fcgi max_input_variables: 10000 time_limit: 300 memory_limit: 256M max_input_time: 300 upload_max_filesize: 128M php_post_max_size: 128M curl_version: 7.68.0 OpenSSL/1.1.1f suhosin: false imagick_availability: true pretty_permalinks: true ### wp-database ### extension: mysqli server_version: 10.5.12-MariaDB-1:10.5.12+maria~focal client_version: mysqlnd 7.4.25 ### wp-constants ### WP_HOME: undefined WP_SITEURL: undefined WP_CONTENT_DIR: /www/gematria_653/public/wp-content WP_PLUGIN_DIR: /www/gematria_653/public/wp-content/plugins WP_MEMORY_LIMIT: 40M WP_MAX_MEMORY_LIMIT: 256M WP_DEBUG: false WP_DEBUG_DISPLAY: true WP_DEBUG_LOG: false SCRIPT_DEBUG: false WP_CACHE: false CONCATENATE_SCRIPTS: undefined COMPRESS_SCRIPTS: undefined COMPRESS_CSS: undefined WP_LOCAL_DEV: undefined DB_CHARSET: utf8 DB_COLLATE: undefined ### wp-filesystem ### wordpress: writable wp-content: writable uploads: writable plugins: writable themes: writable mu-plugins: writable ### pods ### pods-server-software: nginx/1.21.3 pods-user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.71 Safari/537.36 pods-session-save-path: /var/lib/php/sessions pods-session-save-path-exists: No pods-session-save-path-writable: No pods-session-max-lifetime: 1440 pods-opcode-cache-apc: Yes pods-opcode-cache-memcached: No pods-opcode-cache-opcache: Yes pods-opcode-cache-redis: No pods-object-cache-apc: Yes pods-object-cache-apcu: Yes pods-object-cache-memcache: No pods-object-cache-memcached: No pods-object-cache-redis: Yes pods-memory-current-usage: 25.455M pods-memory-current-usage-real: 16.000M pods-network-wide: No pods-install-location: /www/gematria_653/public/wp-content/plugins/pods/ pods-developer: No pods-tableless-mode: No pods-relationship-table-enabled: Yes pods-light-mode: No pods-strict: No pods-allow-deprecated: Yes pods-api-cache: Yes pods-shortcode-allow-evaluate-tags: No pods-sessions: Disable sessions pods-can-use-sessions: No ` ```
sc0ttkclark commented 3 years ago

Fixed via b0b0b9767fa9042971fc20d19551b1916ff63086