AdvancedCustomFields / AdvancedCustomFields/acf

Uncaught TypeError - when changing Permalink Rewrite to No Permalink

Open
#816 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PHP
Stars
945
Forks
197
PR merge metrics
No merged PRs in 30d

Description

I've started creating post types within ACF. However, when I changed the Permalink Rewrite on one of them to No Permalink. The ACF admin page for that post type would return:

load-scripts.php?c=1&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,wp-polyfill-inert,regenerator-runtime,wp-polyfill,wp-hooks&ver=6.2

UNcaught TypeError: Cannot read properties of undefined (reading 'outerHTML')
    at t.fn.outerHTML (acf.min.js?ver=6.1.4:1:27660)
    at n.addTab (acf-input.min.js?ver=6.1.4:1:46567)
    at n.initialize (acf-input.min.js?ver=6.1.4:1:44052)
    at n.e (acf.min.js?ver=6.1.4:1:3259)
    at acf.Model (acf.min.js?ver=6.1.4:1:3393)
    at n [as constructor] (acf.min.js?ver=6.1.4:1:6560)
    at new n (acf.min.js?ver=6.1.4:1:6560)
    at acf.newField (acf-input.min.js?ver=6.1.4:1:58141)
    at acf.getField (acf-input.min.js?ver=6.1.4:1:59602)
    at HTMLDivElement.<anonymous> (acf-input.min.js?ver=6.1.4:1:59732)

I can't change it back because the page won't render past the Visibility tab. All the other post types I've created work fine.

WordPress is up to date, and I'm not using any other plugins.

If you need further information, just let me know.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue in the WordPress ACF admin page by creating a post type and changing Permalink Rewrite to No Permalink. Start with the stack trace in acf.min.js and acf-input.min.js, especially the outerHTML call and addTab initialization. Done means the post-type page renders past the Visibility tab and the setting can be changed back.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, php
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.