Title: Validate Structure validate_guid
Last modified: June 1, 2026

---

# Validate Structure validate_guid

 *  [Valice](https://wordpress.org/support/users/valicesupport/)
 * (@valicesupport)
 * [6 days, 17 hours ago](https://wordpress.org/support/topic/validate-structure-validate_guid/)
 * In the Validate Structure section we see that all our documents are coming back
   with the “The guid does not contain the site URL” warning.
 * Within wp-document-revisions/includes/class-wp-document-revisions-validate-structure.
   php there is a `validate_guid` function which is expecting the guid to be in 
   a format like this –
 *     ```wp-block-code
       ?post_type=document&p=
       ```
   
 * But looking at an example, they appear to be stored with the ampersand converted
   to its HTML entity –
 *     ```wp-block-code
       ?post_type=document&#038;p=
       ```
   
 * Not sure if WordPress just changed how that gets stored or what but, updating
   that function removes most all the errors:
 * There are a few references to this in that `validate_guid` function, but we don’t
   fit into the other cases so we only needed to modify one reference.
 * Changed –
 *     ```wp-block-code
       $permalink1 = site_url( '?post_type=document&p=' . (string) $doc_id );
       ```
   
 * To –
 *     ```wp-block-code
       $permalink1 = site_url( '?post_type=document&#038;p=' . (string) $doc_id );
       ```
   
 * Seems like you might want to account for both but looking at even ones uploaded
   recently, the guid is using `&#038;` and not `&` so probably just WordPress changed
   how they store that at some point?
 * You could probably support both just by running the guid through the `html_entity_decode`
   function, which converts entities back to their original character(s).
 * Thanks!

You must be [logged in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fvalidate-structure-validate_guid%2F%3Foutput_format%3Dmd&locale=en_US)
to reply to this topic.

 * ![](https://s.w.org/plugins/geopattern-icon/wp-document-revisions_6c6c6c.svg)
 * [WP Document Revisions](https://wordpress.org/plugins/wp-document-revisions/)
 * [Support Threads](https://wordpress.org/support/plugin/wp-document-revisions/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-document-revisions/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-document-revisions/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-document-revisions/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [Valice](https://wordpress.org/support/users/valicesupport/)
 * Last activity: [6 days, 17 hours ago](https://wordpress.org/support/topic/validate-structure-validate_guid/)
 * Status: not resolved