Problem/Motivation

Two asset generation issues were reported.

First (original report) when uploading assets via the upload widget, Drupal considers the upload process complete as soon as a successful API response is returned. In practice, this often happens before all derivatives are generated on the Bynder side.

This sometimes results in Drupal storing incomplete metadata and/or rendering asset links that are not yet available. This then leads to broken asset usage after upload.

Second (additionally reported). When picking an asset from the CompactView (typically a recently updated asset), the Bynder API returns a blank transformBaseUrl. Because DAT image transformations depend on this field, the selected asset renders as a broken image.

Proposed resolution

A global "asset readiness check" setting is added to the Bynder configuration form (/admin/config/services/bynder), replacing the previous per-upload-widget setting. The configurable derivative can be:

  • None: skip the check entirely (default, preserves previous behaviour)
  • DAT or a derivative

Introduce a configurable global "we are ready" target.

For uploads check for the presence of a specific derivative before the batch process completes.

For the search/CompactView widget, a new endpoint (POST /bynder/derivatives/check) accepts a list of Bynder asset UUIDs and returns their readiness status. After the user selects assets, the JS loop checks this endpoint every 3 seconds and displays a waiting message until assets report ready (only images), then submits the form.

Remaining tasks

User interface changes

API changes

Data model changes

CommentFileSizeAuthor
#8 Screenshot from 2026-05-04 16-32-38.png16.76 KBprimsi

Issue fork bynder-3570572

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

primsi created an issue. See original summary.

primsi’s picture

Issue summary: View changes

primsi’s picture

Status: Active » Needs review
dpagini’s picture

I've shared this with our contact at Bynder, but I was asked to take a look at this code as a fix for an issue we are having, and I'm not sure this is addressing the actual issue my company is running into. We are using the Bynder search widget, and when we pick an asset from the CompactView (usually a brand newly updated asset that does not have all the meta data generated for it yet), we are getting a blank transformBaseUrl from the API, and then we don't have a URL to perform DAT transformations on, causing our images to be broken. We are not using the upload widget at all.

berdir’s picture

The scenario that was shared with us is specifically the upload widget, with the argument that it might not yet be fully processed yet at this point.

It's not clear to me how that translates to the compact view and why this information would be empty there. I don't expect that waiting is going to be beneficial in this case. no reason to assume that if it's missing now then it will be there 2s later.

I assume we'll get an update from Bynder on this as well. I know we've discussed this in the past, but I think another call together makes sense to try and understand your scenario.

primsi’s picture

Issue summary: View changes
primsi’s picture

StatusFileSize
new16.76 KB

Screenshot of the waiting message

Waiting message

dpagini’s picture

Status: Needs review » Reviewed & tested by the community

I have been using this patch on our site in production for about a month now. We have not been able to confidently test this, as the problem this solves is not easily recreated. But we also have not gotten reports of the issue in PROD the last month either. I do still issues where the incomplete data is getting pulled in by the site, but a POSSIBLE explanation of this is the SNS update is sending incomplete info, and not the "new asset" endpoint pull.

berdir’s picture

Title: Upload batch should wait for a configurable derivative before completing asset creation » Assets may be incomplete on selection and upload, add wait

  • berdir committed 2d7bc2b9 on 4.x authored by primsi
    fix: #3570572 Upload batch should wait for a configurable derivative...
berdir’s picture

Status: Reviewed & tested by the community » Fixed

Merged, thanks for reporting back

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.