1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Partial Fix Likes links will not be deleted from deleted user

Discussion in 'Resolved Bug Reports' started by DRaver, Oct 31, 2014.

  1. DRaver

    DRaver Active Member

    If a user is deleted, his profile will be also deleted.
    But likes from him stay in the posts with a link to a profile that does not exist.
    You and Google get a 404 error.
    That is bad for seo and also wrong from the code.

    The 404 (Not Found) say: The requested resource could not be found but may be available again in the future. Subsequent requests by the client are permissible.

    The 410 (Gone) say: Indicates that the resource requested is no longer available and will not be available again. This should be used when a resource has been intentionally removed and the resource should be purged.

    I should prefer that the profile retained when delete, as well as all other data from the user.
    But if that is not possible, a 410 code should be sent and not a 404.
    semprot likes this.
  2. Chris D

    Chris D XenForo Developer Staff Member

    On the SEO part, no. It isn't bad for SEO. And Google treats 404 and 410 errors the same:


    404 errors are not bad for SEO:
    Google treats 404 and 410 the same and just expects you to return either:
    In the context of member profiles, when a user is deleted, they are no longer found in the database hence they are treated the same as if they never existed. The 404 is used as a catch all solution and is perfectly valid.
  3. DRaver

    DRaver Active Member

    No, a 404 error is ugly and bad. You can get thousands of error messages displayed in Google Webmaster Tools. A 410 is the right way.

    Anyway. What is the sense of thousands links to documents that do not exist?
  4. Chris D

    Chris D XenForo Developer Staff Member

    Well, according to Google:
    Google treats 410 and 404 the same, so a change here wouldn't impact anything.

    That would be a suggestion, rather than a bug report, though.

    As for not removing likes when a user is deleted, that has been reported before and the current behaviour is As Designed, hence this is a duplicate report:

  5. DRaver

    DRaver Active Member

    You mean the like links will gone after a rebuild of the cache?
  6. Mouth

    Mouth Well-Known Member

  7. rellect

    rellect Well-Known Member

    Even if google treats 410 and 404 differently, I think it's still valid to use 404 in this case.
    As mentioned in the first post, 404 means 'could not be found but may be available again in the future'.
    When user is deleted, his username is now free to use. Somebody else may register with his name and the profile is re-created.
    Chris D likes this.
  8. DRaver

    DRaver Active Member

    If only one person delete day by day and every person has only 100 like links in post than you have 700 internal dead links in a week. 2800 in a month and over 30000 in a year. I have a big board with self delete. So I told you 30000 internal links to nowhere is crap and a BUG.
  9. Chris D

    Chris D XenForo Developer Staff Member

    If you believe that behaviour will have a negative impact (which it won't according to Google) then you need to remove the Self Delete add-on and handle it manually or use a different add-on that can remove the likes automatically.

    Since XF 1.4 there is a remove likes function in the Admin CP for each user.
  10. Chris D

    Chris D XenForo Developer Staff Member

    It's worth noting, too, that it isn't just likes. If you take the following non existent user as an example. If your deleted user has been tagged hundreds of times, that will also lead to 404s.

    @Non Existent User
  11. Mike

    Mike XenForo Developer Staff Member

    Given the focus here on 404 vs 410, you would need to take your own approach to send a 410 if you wanted to. You would need to handle it for all content types as well. Otherwise, when the data is removed, there's nothing for us to know whether the content was valid in the first place. In a sense, sending a 410 vs a 404 would actually leak a difference, which may or may not be significant to you (unlikely, but it does give additional information).

    In terms of the difference to Google, it's mostly regarding how it removes pages from the index; having 404 links is not inherently wrong or unexpected these days.
    Amaury and Chris D like this.
  12. Chris D

    Chris D XenForo Developer Staff Member

    Actually, that video goes on to confirm exactly what the other link on Google's site confirms. The end result of a 410 and a 404 is identical: The page is deleted from the index. The difference lies in how long it actually takes to remove it from the index.

    The video is well worth watching, it makes it very clear the difference in how the two codes are handled:

    My favourite line from it is:
    Amaury and Valhalla like this.
  13. DRaver

    DRaver Active Member

    Forget google. What is with the thousands of error messages in wmt or millions on your server logs? Please explain me @Mike : what is the sense of linking content, what does not exit? Do you think what this is a clean design of a web page? Why you don't delete the like links in posts if a user was delete? And why ist that not a bug. It is.
    Last edited: Nov 1, 2014
  14. Chris D

    Chris D XenForo Developer Staff Member

    Google logs errors in Google Webmaster Tools to give you the opportunity to rectify mistakes that may have been made.

    For example, if you accidentally deleted an entire forum node, the pages would now be serving 404s, logging errors in GWT and you would have an opportunity to solve that problem before it affects the content that is indexed on your site.

    After a period of time, Google will remove those pages from the index, and those errors will no longer appear in Google Webmaster Tools.

    Using a 410 would make that process happen quicker, but the end result is the same.

    The link to the deleted user is likely to be removed when the content is liked by another user because that will rebuild the cache of likes on that content. It has been designed that way.

    This bug report relates to the use of 404 vs 410, hence why this thread is marked "Not A Bug".
    Andrej likes this.
  15. DRaver

    DRaver Active Member

    No, this bug is not report related only to use a 404 or 410. The bug is like links will not deleted from a deleted user. Content what doesn't exit will be linked. That makes no sense and CAN be a sign for Google, that the webmaster has no experience from his own website. Internal massive linking of content that not exit is not a bug?
  16. rellect

    rellect Well-Known Member

  17. DRaver

    DRaver Active Member

    Rebuild every day the cache can't be the "solution". It is a design bug by xf and need to be fixed.
  18. Mike

    Mike XenForo Developer Staff Member

    So I did actually find a bug in that our like cache updating code was running but it wasn't firing correctly on the user delete case. That actually fixes the bug in the subject line. (That code was mostly for merges/username changes, though it works here as well.)

    However, the body of the report actually seems to focus almost entirely on 404 being the wrong response code and that element is not a bug. In theory, 410 may be better but it doesn't make 404 incorrect (a 200 response would be incorrect).

    Because there are 2 components in this report, it makes tagging a resolution difficult.

    Additionally, generally speaking, linking in a cached element to something which may be removed later is not something that we consider as a bug. Caching is needed to improve performance and attempting to change cached content is generally very difficult and, at best, very hacky. It's simply a trade off and if the trade off doesn't fit your needs, it's a change you may need to make for yourself.
    Walter, Mouth, AlexT and 2 others like this.
  19. Mouth

    Mouth Well-Known Member

    "While technically they both mean 'page not found,' Matt Cutts talks about the nuances of each and how Googlebot treats each slightly differently."
  20. DRaver

    DRaver Active Member

    By the way. Rebuilding of the cache dont delete the links. That mean not only the "like links". Also the "tagging links".

    So if your forum ist not to small you have thousends off 404 error every day in your server logs.
    A fault diagnosis is almost impossible because, if you have other problems and want to finde with the help of error logs.

    So the best solution in my eyes is, don´t delete the member profiles by default, if a member was deleted.
    This has several advantages.

Share This Page