Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-28538

Editing content item with image, media, file throws UniqueConstraintViolationException

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Medium Medium
    • 2.0.0
    • 2.0.0-beta3
    • Field types

    Description

      Preconditions: existing content type with ezimage, ezbinary, ezmedia and textline, not required (I tried to reproduce this with content type with single ezimage/ezbinary/ezmedia but it worked fine...). One more language added.

      1. Go to creating new content item with content type from preconditions.
      2. Upload a file to ezbinary, image to ezimage (alt text empty), mp4 file to ezmedia, type text to textline
      3. Publish
      4. Go to translations tab and click on [+], choose only a language from "Select a language for your new translation" and click Create.
      5. Fill textline field and click publish.
      6. From right bar menu click edit and choose eng version
      7. Click save - there are some errors:

      An exception occurred while executing 'INSERT INTO `ezbinaryfile` (contentobject_attribute_id, filename, mime_type, original_filename, version, download_count) VALUES(?, ?, ?, ?, ?, ?)' with params [377, "50aef4960b440ecd5f4135d2cfa0990f.txt", "text\/plain", "logi.txt", 3, 0]:

      SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '377-3' for key 'PRIMARY'

      If I go back and remove content of ezbinary and click save, there is the same error for ezmedia. If I go back againand remove content of ezmedia and ezbinary and click save, nothing happens and console shows:

      Uncaught TypeError: Cannot read property 'isError' of undefined

      Attachments

        Activity

          People

            Unassigned Unassigned
            barbara.grajczyk@ez.no Barbara Grajczyk
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: