Hey there,

We're struggling with this weird behavior with inline images...

Whenever we upload some inline images in the FAQs of our Knowledge Base. The images are displaying well in the front-end, but whenever we go back in edit mode the images appear broken.

We can make edits again (around the broken images) and hit save, and the images will still appear correctly in the front-end...

Front-end

Edit mode

While uploading the images into a FAQ article we received the following error: DB Error #1062
_[INSERT INTO ost_attachment SET file_id = 126, inline = 1, type = 'F', object_id = 4, name = 1]

Duplicate entry '126-4' for key 'file_object'<br />
<br />
---- Backtrace ----<br />
#0 (root)/include/mysqli.php(201): osTicket->logDBError()<br />
#1 (root)/include/class.orm.php(3466): db_query()<br />
#2 (root)/include/class.orm.php(658): MySqlExecutor->execute()<br />
#3 (root)/include/class.attachment.php(180): VerySimpleModel->save()<br />
#4 (root)/include/class.attachment.php(130): GenericAttachments->upload()<br />
#5 (root)/include/class.faq.php(412): GenericAttachments->keepOnlyFileIds()<br />
#6 (root)/scp/faq.php(81): FAQ->update()<br />
#7 {main}_
(but this error did not show up every time we uploaded images - though the broken image issue is always present)

Reading some previous posts on this forum, we tried various things (switching to the Filesystem plugin - thanks @stevland , switch browser, restarting MySQL DB + Apache HTTPD+PHP), but none have solved it ☹️

Any idea how to solve this?

5 days later

@JuVDC

I'm working on this, should have a pull ready soon. Thanks for the report!

Cheers.

a month later
14 days later

Same problem here after updating to the newest version.
Is there a solution for this problem?

4 months later

@ceantuco

Nothing yet, still on our todo list/bug sheet. I will mention that development on legacy codebase (current codebase) will be (and is) somewhat slow. We are focusing most of our efforts into the full codebase rewrite.

Cheers.

    5 days later

    KevinTheJedi

    Hi,

    I got the same issue after updating to 1.15.4.
    Is there any update please?

    Thank you

    3 months later

    Is there any update about this issue? I upgraded to v1.16 and images are still broken.
    It is also not possible to upload any attachments. They look like they uploaded, but after saving and reopening, there are none.

      intossh

      Not at this time. It’s a much deeper issue that will involve a bit of rewriting due to a previous, major Redactor update. With this being said, the code is open source so if you want to take a crack at it and submit a pull request be our guest.

      Cheers.

      2 months later

      Just uncheck "Require login to view any attachments" under Attachments Storage and Settings under System Settings and Preferences and this will take care of it!

        Intellixis

        That’s is not relevant to this thread. This thread is about inline images in FAQ Edit.

        Cheers.

        6 months later

        Hi, we'll be upgrading to 1.17, and images are still broken. Any news about the release?
        Thank you

          2 years later

          Hi, I have the same problem, maybe you have a solution? Is the general solution done?

            Write a Reply...