• Another feature I noticed. Again do not know if this is intended change implemented in v0.7.

    When translating a post (P2) in Language 2 (L2) I populate the corresponding post (P1 in Language 1) ID field and then press ‘Publish’, the value of the ID field disappears. In the list of all posts this particular P2 post (just added) is visible as not linked to the corresponding P1. So basically I can see a + sign in L1 column.

    I need to edit the P1 post and input P2 post ID in the ID field in order for P1 and P2 to be linked.

    I believe in v 0.6 ID value was remembered and also visible in bot hP1 and P2 once the P2 was saved.

    regards,

Viewing 13 replies - 1 through 13 (of 13 total)
  • Thread Starter TheElear

    (@peterpap)

    I find it easier to go and edit existing post in L1 and confirm its L1 language. so basically ‘edit’ it and ‘update’ as is. The + icon then shows and I add a translation in L2 by clicking the + sign.

    Everything links automatically: IDs, tags, etc

    regards,

    Before 0.7, Polylang was not checking that the post id entered for the translation was referring to an existing post and if the post was in the right language.

    With 0.7, I introduced a check. So the link is not saved if the post does not exist or if it is not in the right language. Of course, if you use the plus button or the “add new” (translation) link, you should not experience any issue as Polylang should always enter valid post ids in the input fields.

    Thread Starter TheElear

    (@peterpap)

    I tried to add translation to P1 by using a link ‘add new’ next to the ID field. THis works like ‘Add new’ post but once the new post (P2) is added it does not link P1 and P2.

    regards,

    Does the post id of P1 appear in the list of translations of P2 ?

    Thread Starter TheElear

    (@peterpap)

    no it does not. I hoped that by using this ‘add new’ link next to the blank ID field of P1 I will be able not only to add new P2 (translated post) but also have it already linked as it would be added from within the P1.

    I also noticed that I keep getting a new tag ‘undefined’ added to all posts I link. This is the process I follow:
    1. I open existing P1 post and click ‘Update’
    2. I bring up the list of ‘All post’ and can now see a pencil and + icon next to P1
    3. I click on the +
    4. I add translated post P2. I can see fields like category, tags and also ID is pre-populated and correct.
    5. I ‘Publish’ P2
    6. I can now see in the ‘All posts’ view that a new tag – ‘undefined’ – appeared both in P1 and P2.

    I am aware of the undefined tag. I am currently fighting against it ! Please apply the quick fix in the other post. It should solve this issue too.

    Coming back on the first issue, I do not understand… I works well on my test site.

    What url do you get when clicking on the add new (translation) ? I should be the same as when you click on the +. Something like:

    https://yoursite.com/wp-admin/post-new.php?post_type=post&from_post=237&new_lang=en

    Thread Starter TheElear

    (@peterpap)

    Hello,

    1. On the first issue of URLs behind ‘add new’ and + sign they are indeed exactly the same. It must have been something different I did that gave me 2 different results. I will fiddle with adding translations (still have 400 posts to translate) and report back here if I find anything

    2. On the second issue, I changed the script as advised:

    // jQuery('input.newtag').addClass('polylang-newtag');
    // jQuery('input.newtag').removeClass('newtag');

    This however did not fix the issue of ‘undefined’ tag appearing.

    Adding a new tag to either original (P1) or translated (P2) posts is still not possible either. I can type a new tag name in the tag field. It appears on the list if it is already in the system. However when I click ‘Add’ button, ‘undefined’ tag is added instead of the one I typed in.

    Thread Starter TheElear

    (@peterpap)

    ok, update on issue no 1.

    Even though the URLs are the same the result is different. THis is the comparison of what happens:

    Workflow A.
    – I open the post P1 (in Language L1) and click on the ‘Add new’ button to add translation.
    – I am redirected to the blank new post screen where I can add translated content = post P2.
    – the ID field is blank
    – once I publish the P2, there is no link to P1.

    Workflow B.
    – I open the post P1 (in Language L1) and click on the ‘Update’ button
    – I go back to the list of all posts and can see that now my just updated post P1 has a pencil and + sign
    – I click on the + sign
    – I am redirected to the blank new post screen where I can add translated content = post P2.
    – HERE is THE DIFFERENCE – the ID field has the ID number of post P1
    – once I publish the P2, THERE IS link to P1 – two pencils visible

    Thread Starter TheElear

    (@peterpap)

    And here update on issue 2.

    It is possible to add new tags in ‘Quick Edit’ mode.
    Still not possible to add tags in normal ‘Edit’ mode.

    regards,

    Issue 1.

    Maybe an explanation ? Since you are working on an existing site, all your existing posts have no language set. So before you resave it (clicking on update), Polylang does not know the post language and so cannot setup the translation correctly. You believe that the post language is set because the dropdown list displays the default language, but the language is not affected to the post before you save it.

    There is an option to help you in such situattion. You can affect the default language to all existing posts, pages, categories and tags (with no language set) by checking the option (in red) ‘There are posts, pages, categories or tags without language set. Do you want to set them all to default language ?’ and then clicking ‘save changes’. Once you have done it, the option will disappear.

    Issue 2

    Sorry I thought the quick fix proposed would solve the ‘undefined tag’ issue too. I am still working on it and will release some correction soon.

    Thread Starter TheElear

    (@peterpap)

    Hello Chouby ??

    Spot on! This is exactly what happens re: Issue 1.
    I thought that the language was set because the dropdown list displayed the default language. THe language was in fact only set after i ‘Updated’ the post.

    Re Issue 2.
    I hope you are not tired with my constant writing here about my findings. Hope this feedback is of value to you.

    The more I use Polylang the more I like it! Brilliant plugin and couple of bugs are not going to change it.

    Your bug reports is very much appreciated. It helps a lot! Polylang has grown quickly since the first release in September. Maybe too quickly so there are some bugs. But I try to correct them quickly.

    I just released a development version. It should correct the issues with the tags. It would be very helpful if you could test it before I release the v0.7.1.

    Thread Starter TheElear

    (@peterpap)

    Glad I can help! Thanks for your support.

    Here is what I did on my test site:
    1. I tested the option in the language Settings – the red link you mentioned: ‘There are posts, pages, categories or tags without language set. Do you want to set them all to default language ?’ and then clicking ‘save changes’.
    I confirm it works as intended.

    2. I uploaded the development version of the plugin through FTP. I did not uninstall the plugin nor deactivate it first. I simply overridden existing files with the new files through ftp. Hope this is ok.
    When logged back into the WP admin. the plug in is active and is showing version 0.7.4.

    I tested the ‘undefined’ issue. It looks that it is rectified:
    – I can add new tags without problems.
    – tag metabox is showing tags relevant to the language of the post
    – correct tags are shown and assigned to the post and translation also when they spell the same and the only difference is in the slug

    Congratulations Chouby! You hit the nail on a head. Looks like the job is done!

    Please let me know if you want to test me anything more.
    I will obviously test the new version once released.

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘linking post translations in v 0.7’ is closed to new replies.