Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Asset alt text missing from REST API response when querying an Entry #10011

Closed
joshuablum opened this issue May 7, 2024 · 0 comments · Fixed by #10013
Closed

Asset alt text missing from REST API response when querying an Entry #10011

joshuablum opened this issue May 7, 2024 · 0 comments · Fixed by #10013
Labels

Comments

@joshuablum
Copy link
Member

Bug description

When querying the /api/collections/{collection}/entries endpoint and the entries include an asset, the alt text is missing from the response. When querying the asset directly (e.g. /api/assets/{container}/{path}) it's there.

Querying the collection and its entries (or just that specific entry by itself):

{
  "assets_field":
    [
      {
        "id":"assets::test.png",
        "some more stuff but no alt text"
      }
    ]
}

Querying the asset works as expected:

{
  "alt":"Wow, this is an Alt text.",
  "id":"assets::test.png"
}

How to reproduce

  1. Query the /api/collections/{collection}/entries endpoint with the blueprint having an asset field
  2. Have an alt text for the image
  3. See that the response does not include the alt text

Logs

No response

Environment

Environment
Application Name: Statamic
Laravel Version: 10.48.10
PHP Version: 8.3.6
Composer Version: 2.7.1
Environment: local
Debug Mode: ENABLED
URL: sandbox.test
Maintenance Mode: OFF

Cache
Config: NOT CACHED
Events: NOT CACHED
Routes: NOT CACHED
Views: CACHED

Drivers
Broadcasting: log
Cache: statamic
Database: mysql
Logs: stack / single
Mail: smtp
Queue: sync
Session: file

Statamic
Addons: 0
Antlers: runtime
Sites: 1
Stache Watcher: Enabled
Static Caching: Disabled
Version: 4.57.3 PRO

Installation

Fresh statamic/statamic site via CLI

Antlers Parser

None

Additional details

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant