• Resolved kov09

    (@kov09)


    Hello again!

    Plugin sends records to Algolia with translated strings depending on admin panel language, but not on the site’s original. So at least in the end we get different post labels on Algolia side… It doesn’t happen during WP-CLI re-indexing.

    I mentioned it here before.

    Any workaround or upcoming fix? – Thanks!

Viewing 14 replies - 1 through 14 (of 14 total)
  • Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    Looking at https://github.com/WebDevStudios/wp-search-with-algolia/blob/main/includes/class-algolia-compatibility.php

    I am seeing wpml_switch_language and wpml_switch_back_language methods that are being used on line 37 and 38.

    I’m curious if the issue you’re presently seeing would go away if you comment out both of those lines temporarily.

    I’m not seeing anything about language switching in https://github.com/WebDevStudios/wp-search-with-algolia/blob/main/includes/class-algolia-cli.php

    Thread Starter kov09

    (@kov09)

    We don’t use WPML, but MultilingualPress. In case with WP-CLI it requests each subsite separately with url param, so I guess it gets correct language in all cases…

    Issue can be reproduced on clear installation without any plugin for multilingualism, – just select different admin language and create/re-save post or do re-indexation from the panel.

    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    Noted on the i18n tool.

    Not really managing to recreate, at least not in a way that is obvious.

    I changed the default language for an install, edited an existing indexed page, but not seeing duplicates or anything like that. It updated the existing one.

    Thread Starter kov09

    (@kov09)

    Wasn’t post label changed to selected admin language?

    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    That part wasn’t translated ever, so it didn’t have a different variation to work with, and your instructions above didn’t say anything about changing the post label, just updating in some way.

    My test was legitimately adding a period to a sentence and clicking update, which is enough for the post in question to re-index and update.

    Thread Starter kov09

    (@kov09)

    The thing is in translations… For example, if FE part is on DE language and all pages have Seiten post label after WP-CLI re-indexation, when we change admin lang to EN and push any page to the Algolia after some change – it will have Pages post label. Same happens with other translated strings.

    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    It’s going to be difficult for us to test/try anything with this, as we don’t have access to a copy of Multilingualpress that I’m aware of.

    I am curious if for some reason, the difference between UI and CLI is in what it queries for and for which language. Sounds like Multilingualpress may not be accounting for CLI queries, whether intentional or not, while UI filters and takes into account which is the current language being viewed for things.

    Worth checking with them at least, for the sake of a lead.

    Thread Starter kov09

    (@kov09)

    It’s not related to MultilingualPress, the point is in different admin language which can be set in clear installation….

    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    It still very much may be if they’re adding in filters that dictate what content gets queried, like based on current language, and only returns that specific content.

    Can you confirm whether or not it happens with the bulk re-index using the UI buttons in our setings pages? or if it’s just when updating/editing single pieces of content?

    Asking this because I’m looking at our WP-CLI code and it’s running the re-index method on the set up indexes, which I believe would also be doing just everything in bulk. So I’m wondering if there’s a process difference in bulk vs individual, that is at play here.

    I also am still not able to do any deep dive troubleshooting as mentioned yesterday since I don’t have access to MultilingualPress, and it would still be a good idea to reach out to them to see if they modify queries to return just specific language-based content.

    Thread Starter kov09

    (@kov09)

    It happens on bulk re-index from the panel and on single edit.

    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    Gathered some thoughts with others who help maintain and develop the plugin, and I have listed them below.

    * We have little to no idea about the setup. A guess is that it is a multisite because you mentioned using the url parameter in the WP CLI command.
    * Secondly, we are not too sure what you mean by “Post Label”. Is it post title?

    If needed, would you be willing to move some debugging correspondence to private, instead of on the forums here?

    Thread Starter kov09

    (@kov09)

    We have little to no idea about the setup. A guess is that it is a multisite because you mentioned using the url parameter in the WP CLI command.

    Yes, but it can be reproduced on single site setup as well.

    Secondly, we are not too sure what you mean by “Post Label”. Is it post title?

    Sorry, I meant post type label.

    Thread Starter kov09

    (@kov09)

    Maybe it’s better to get some screen-recording, I’ll try to do that…

    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    If you could reproduce and record every step on a single site install with just a second language, installed, that’d be awesome because I haven’t been able to reproduce on that version thus far. However you know the detailed steps more than I do thus far.

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘Strings translation issue’ is closed to new replies.