WordPress.org

Ready to get started?Download WordPress

Forums

Broken Link Checker
Custom Fields Cause Phantom Broken Links (7 posts)

  1. billybitmap
    Member
    Posted 2 years ago #

    I'm checking a custom field for broken links. Each field causes a 404 in the report, even if there are no links in the custom field.

    The custom field is an optional text field which can be filled out in addition to the main editing area on a page. (It stores text for a sidebar area.)

    In the broken links report:

    • The "Link Text" column shows the variable name for the custom field. (Not sure if that's normal.)
    • The URL column shows a malformed link. The link starts with the full address of the page that the custom field is associated with. The text of the custom field is then appended to the link.

    For instance, let's say the text "More turtle info" is stored in the custom field for the page at "http://myblog.com/turtles/". This will cause the plugin to think there's a broken link with the URL: "http://myblog.com/turtles/More turtle info"

    The entry for the custom field in the database doesn't look strange.

    Has anyone seen this before? Any suggestions?

    http://wordpress.org/extend/plugins/broken-link-checker/

  2. sickhippie
    Member
    Posted 2 years ago #

    I just ran into this same issue. I use ACF to create my custom fields, and fixed the issue by selecting 'field groups' instead of manually entering the custom fields. Switching your custom fields to field groups should fix the issue.

  3. billybitmap
    Member
    Posted 2 years ago #

    Thanks SickHippie.

    I didn't realize that "field groups" would check the same content. I appreciate the reply. :)

  4. billybitmap
    Member
    Posted 2 years ago #

    Just tried adding a bad external link to a custom field and then doing a "re-check all pages". Unfortunately the plugin didn't catch the bad link.

    Does anyone know what the difference between "custom fields" and "field groups" is on the "look for links in" tab in the settings?

  5. sickhippie
    Member
    Posted 2 years ago #

    Update to this - field groups are a grouping of custom fields, and it looks like it's part of how several CPT plugins function but not normally part of WP core. If your custom field was created on its own, then it wouldn't be part of a field group.

    Looks like the latest version of Broken Link Checker now lets you specify which custom fields to search, which is helpful until you have more than a few. The site I'm working on right now has 30+ custom fields that are constantly being changed and updated, which has proven to be frustrating.

  6. billybitmap
    Member
    Posted 2 years ago #

    Thanks for the update SickHippie. :)

  7. sickhippie
    Member
    Posted 1 year ago #

    One more update. Even putting a list of all my fields in, there are a number of them that quite simply aren't checked. I've intentionally put in broken links and some of the time it just doesn't even see it. I won't have time to do more with it for a month or more (large projects looming), so I ended up using a third party service to check it externally instead. I still use BLC for pages and posts, but without working properly on custom fields, I'm not sure how much longer I'm going to stick with it.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic