#36928 closed defect (bug) (wontfix)
GUID prepended with http://
| Reported by: | keithcancel | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Feeds | Version: | 4.5.2 |
| Severity: | normal | Keywords: | |
| Cc: | Focuses: |
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?
Change History (3)
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
You might be looking at unhooking
esc_url_rawon thepre_post_guidfilter as well. There's alsopost_guidfor display in certain contexts. You can find several default filters with guids included inwp-includes/default-filters.php.