Uploaded image for project: 'Planet4'
  1. Planet4
  2. PLANET-4774

Investigate why certain attachments have many duplicate metadata records.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Released
    • Icon: Must have Must have
    • 2.31.2
    • None
    • 8
    • Campaigns, Media Library
    • Sprint #132, Sprint #133

      Certain attachments have many duplicate metadata records. Something must be creating these, possibly on every save. It could be that the metadata is updated with 

      add_post_meta(...)

      instead of with

      update_post_meta(...)

      both functions have the result that the new value is used and create a record if there is none yet. However add_post_meta will always create a new record, after which the old record lingers in the database and is never used again.

      Tasks:

      • Find out which code is creating instead of updating these records.
      • Investigate if we should use a plugin or post-deploy script to clean up old records, as they might affect performance.
      • Create follow up task if needed

            sdeshmuk Sagar Deshmukh
            pvincent Pieter Vincent (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: