Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter mbrennwa

    (@mbrennwa)

    Hi, I just tracked down the wrong sorting to an incompatibility with the qTranslate plugin. The sorting may go wrong depending on how the language information is stored in the post title. Is this something that would need to be changed in qTranslate or in the Category Posts plugin?

    mbrennwa

    Hi mbrennwa,

    thank you kindly for reporting your issue.

    As far as I know, the way I set the ordering is correct. The code specifies that ‘title’ should be used to order. I’m not aware of how qTranslate manipulates the title, but I feel it should not affect the ordering. Unless I’ve used the wrong field to order by, I’ll check this.

    Kind regards,
    Diana

    Thread Starter mbrennwa

    (@mbrennwa)

    Hi Diana

    qTranslate adds some extra notation to allow distinguishing between different languages. For instance, the post title might be:
    – English title first, then German title: <!–:en–>Peerless Subwoofer (active)<!–:–><!–:de–>Peerless Subwoofer (aktiv)<!–:–>
    – German title first, then English title: <!–:de–>Peerless Subwoofer (aktiv)<!–:–><!–:en–>Peerless Subwoofer (active)<!–:–>

    Alternatively, the post title might be the same in both languages. Then, there’s no need to add the extra code (<!–:en–> and stuff).

    If the sorting is done using the raw post title fields that may include things like <!–:en–>, <!–:de–>, etc., things go wrong. I guess it would be better if qTranslate would process the post titles first, i.e., it should extract the post title in the current language. This would strip away the <!–:en–> and similar bits, and would result in proper sorting.

    However, I don’t know enough about WordPress programming and plugins to tell if this is something that should be done in the Category Posts Menu plugin, or in the qTranslate plugin.

    Cheers
    Matthias

    Hi Matthias,

    thanks for your reply and clarification.

    The orderby functionality is not implemented by my plugin, I use standard WordPress functionality.

    So essentially, the qTranslate plugin seems to break the WordPress orderby functionality: Any other plugin that would use ‘orderby’ = ‘title’ would have this same problem. Based on this information, I would like to kindly request you to report this issue with the qTranslate plugin developers.

    Kind regards,
    Diana

    Hello,

    I had the same problem and I found a temporary solution.

    I had already a lot of posts before I installed qTranslate and these posts are not affected. But when creating new posts, the plugin indeed makes the title begin with comment symbols.

    So I tried changing it in my database. Find the new posts in your database (table: wp_posts) under post_title with post_status ‘published’. Change the value to the normal title.

    Example:

    change: <!–:en–>Hello<!–:–><!–:nl–>Hello<!–:–><!–:zh–>Hello<!–:–>

    to: Hello

    That should do it for now. It’s not a permanent solution. I hope the qTranslate-plugin-designers take care of the issue.

    Greetz,

    Thomas

    Thread Starter mbrennwa

    (@mbrennwa)

    Thanks Thomas for this suggestion. This works if the the same post titles are used in all languages. However, I prefer translating the titles.

    I also found that in my case the German titles are used for the ordering of the menu entries, even if the posts and menu entries are displayed in English. For example:

    Post 1 with titles:
    – German: “Erstmals”
    – English: “First Time”

    Post 2 with titles:
    – German: “Wieder”
    – English: “Again”

    Sorting these titles alphabetically in the menus SHOULD give:

    German:
    1. “Erstmals”
    2. “Wieder”

    English:
    1. “Again”
    2. “First Time”

    In reality, the German menu will turn out as above. However, the entries in the English menu will be reversed, because the sorting is done using the German titles (I believe).

    I have reported this bug at the qTranslate WordPress support site, but did not get any response until now.

    Cheers
    Matthias

    Hi Thomas and Matthias,

    indeed, it seems that if sorting is done, then the result will be

    <!–:de–>Erstmals<!–:–><!–:en–>First Time<!–:–>
    <!–:de–>Wieder<!–:–><!–:en–>Again<!–:–>

    if the qTranslate plugin first adds the German title to the database.

    If you don’t mind, I’m going to mark this question as ‘resolved’ for my plugin. Since Matthias has reported the bug at the qTranslate support forums, further discussion is best done there so that the developers of the qTranslate plugin have all the information they need.

    Thank you kindly for reporting this issues. Should any issues arise with my plugin, please don’t hesitate to reopen or open a new topic.

    Kind regards,
    Diana

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Alphabetic sorting not working well’ is closed to new replies.