• Resolved dragos_2p

    (@dragos_2p)


    Hello,
    I recently started to update the posts on my page using xml files. During the first import I used one advance field where I imported specific data field.

    At update (checked the option Update Exiting “Post” if title are match) using a new xml, the same advance field name/key is used but with the new value. I noticed that instead of updating the value, is adding new advance field with the same name and the new/updated value from the new xml.

    In the end, after the update I have two custom fields with the same name and different values.

    Is there anything I can do to replace the advance field value instead of adding new one with new value?

    Thank you for your help,
    I appreciate your work developing the plugin
    Regards

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Xylus Themes

    (@xylus)

    Hello @dragos_2p,

    Thank you for reaching out to us.

    Can you please provide both the XML files so that we can check them and customize them in the plugin and provide you?

    Thread Starter dragos_2p

    (@dragos_2p)

    Hello,
    the custom field was set to use value </item/aff_code> from first xml and should use </item/url> in the second xml.
    Here is the link where you can find both xml files https://drive.google.com/drive/folders/18zBeTJqnj-hKaZ9ji_hVfwEmbI6OWXPn?usp=sharing

    Thank you,
    Dragos

    Plugin Author Xylus Themes

    (@xylus)

    Hello @dragos_2p,

    Thanks for providing the XML file.

    Can you please make sure that both the files have checked in the “Update Exiting” post “if the title matches” option? If you checked this option in both files, the plugin will not create a new post with the same title.

    Thanks

    Thread Starter dragos_2p

    (@dragos_2p)

    Hello,
    for the files imported the first time, not all of them had the option “Update Exiting” post “if the title matches” checked. I edited the existing imports from “Manage import” and checked the option.
    On the new import, I set this option on.

    Using the new xml file, the posts are updating but the custom fields are kept from both imports.

    I attached few print screens on the same link, maybe it helps.

    Thanks
    Dragos

    Plugin Author Xylus Themes

    (@xylus)

    Hello @dragos_2p,

    Thank you for reporting the bug.

    We have customized code in the below file. so please copy-paste the below-updated code in the “custom_field.php” plugin file.

    The file path: plugins/wp-smart-import/includes/save_post/custom_field.php

    Updated code: https://gist.github.com/Rajat1192/7bffefaa1388273088bcb3ea09248794

    Thanks

    Thread Starter dragos_2p

    (@dragos_2p)

    Hi @xylus,
    the updated code works great, thank you for your help.

    I will open another topic with a similar problem with images, i hope it is fine.

    Regards,
    Dragos

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘duplicated Custom Fields at update’ is closed to new replies.