<span class="resolved" aria-label="Resolved" title="Topic is resolved."></span>Bug in filter-hook for “page_link”

Replies: 1

Hey!

I found an issue that causes the URL-field to disappear when editing a page, meaning that you can’t change the permalink/slug.

How to replicate:

  1. Set up a plain WP installation
  2. Go to a page and see that you can change the permalink in the “Page”-section in the sidebar by changing the field “URL”.
  3. Install this plugin and activate it.
  4. Go back to the page and see that the URL-field has disappeared.

I also found the fix. In the file “inc/init.php”, line number 59-60 should be replaced with:

if(is_admin()) return $link;

The current code causes the filter “page_link” to return null when in WP Admin-context. If this is intentionally then you find a different way to solve what you’re trying to achieve as this interferes with WP.

Best regards

Robert S.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer