Make WordPress Core

Opened 8 years ago

Closed 7 years ago

Last modified 7 years ago

#36928 closed defect (bug) (wontfix)

GUID prepended with http://

Reported by: keithcancel's profile keithcancel Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.5.2
Component: Feeds Keywords:
Focuses: Cc:

Description

I noticed that when I update/save a post with a non-url guid, that wordpress prepends http:// to the front of the guid. However, I have not found a mechanism for changing this behavior. When found ticket #31080 I hoped that would fix the issue. I am also confused since reading the docs it says nothing about the guid needing to be a url.

I tried the the suggested snippet of code with slight variations to no avail.

remove_filter( 'the_guid', 'esc_url' );

function escape_the_guid($guid){
    //tried other things before returning. 
    return $guid;
}
add_filter( 'the_guid', 'escape_the_guid' );

Lastly, why is there not a unique constraint on the guid column?

This is a related to #31080, #18395

Change History (3)

#1 @drebbits.web
7 years ago

  • Resolution set to wontfix
  • Status changed from new to closed

You might be looking at unhooking esc_url_raw on the pre_post_guid filter as well. There's also post_guid for display in certain contexts. You can find several default filters with guids included in wp-includes/default-filters.php.

#2 @netweb
7 years ago

  • Milestone Awaiting Review deleted
Note: See TracTickets for help on using tickets.