• Resolved Pieter Bos

    (@senlin)


    Hi Lester,

    Awesome plugin that is very useful especially with installs that have been around for a while already!

    I have a question though regarding how the plugin deals with for example WPML? WPML works makes relationships between data to “link” the different languages together.

    Does sweeping the database affect those relationships in any way?

    Thanks for letting me know!

    Piet

    https://www.ads-software.com/plugins/wp-sweep/

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Lester Chan

    (@gamerz)

    Unfortunately, I can’t answer that since I don’t use WPML. technically, it should not matter.

    It uses this query to check
    SELECT COUNT(object_id) FROM wp_term_relationships AS tr INNER JOIN wp_term_taxonomy AS tt ON tr.term_taxonomy_id = tt.term_taxonomy_id WHERE tt.taxonomy != 'link_category' AND tr.object_id NOT IN (SELECT ID FROM wp_posts)

    So if any object_id is in wp_term_relationships but is not a wp_posts ID, it is likely an orhan because they are related.

    Since I only have a couple of sites to test with, my scope of testing is limited. Maybe you can help me out? To see if it causes any issue?

    Thread Starter Pieter Bos

    (@senlin)

    Hi Lester,

    Appreciate you’re getting back at me so quick on this.

    Did a few quick tests and especially when sweeping terms, things may quickly fall apart.

    For example on a tri-lingual website where default language is English and Dutch and Mandarin Chinese as secondary languages, I have made a category called hello (en). The linked categories if the secondary languages are nihao (zh-hans) and hallo (nl).

    Now I write a post in Chinese and I publish it to the category nihao.

    If I then do a sweep it removes the empty hello and hallo categories and with it the relationship between the Chinese and the English/Dutch categories.

    I would be very happy to make a dev environment available for you, so you can play around with it yourself. Please let me know!

    Piet
    (piethfbos[]gmail)

    Plugin Author Lester Chan

    (@gamerz)

    Terms as in unused terms or orphaned terms?

    Thread Starter Pieter Bos

    (@senlin)

    I’m not sure I understand…
    the difference being?

    Plugin Author Lester Chan

    (@gamerz)

    I am guessing you mean “Orphaned Term Relationship”? You have any idea how are they linked?

    Thread Starter Pieter Bos

    (@senlin)

    I think it is done through (invisible) metadata, but I’m not 100% sure on that

    Plugin Author Lester Chan

    (@gamerz)

    What kind of metadata? Postmeta? or using the terms, terms_taxnomy or term_relationships?

    In your previous post, you mentioned “If I then do a sweep it removes the empty hello and hallo categories and with it the relationship between the Chinese and the English/Dutch categories.”

    What is the Sweep that you did? “Orphaned Term Relationship”?

    I will probably wait for someone to be more well verse with WPML and how the internal works.

    For now, I don’t think I got time to take a look at the code or play around with it. If you know how that works before me, do let me know =)

    I am going to focus on three things in the future.
    1. Optimize DB
    2. Sweep All
    3. Show the stuff that can be deleted.

    Thread Starter Pieter Bos

    (@senlin)

    Sorry, I did the unused term sweep.

    I will probably wait for someone to be more well verse with WPML and how the internal works.

    WPML is a very complex plugin and if you are going to wait for that, I don’t think WP-Sweep will ever become compatible with WPML ??

    The team behind it is very helpful with assisting plugin developers to making their plugins compatible with WPML.

    You can contact them via: https://wpml.org/documentation/theme-compatibility/go-global-program/

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Question: how does this work with WPML?’ is closed to new replies.