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

CMS 5.3.0-beta1 regression: "Failed to load link" with anchor links #333

Closed
GuySartorelli opened this issue Sep 10, 2024 · 5 comments
Closed
Labels

Comments

@GuySartorelli
Copy link
Member

GuySartorelli commented Sep 10, 2024

When adding a link to a "page on the site" with silverstripe/linkfield inside an elemental block, we get this error when publishing (unclear if it's publishing the page or the block)

Failed to load link(s)

image

Note that the correct link displays after refreshing the page.

Steps to reproduce

Note this assumes you have silverstripe/frameworktest installed, along with the rest of kitchen sink.

  1. Add Link List Block
  2. Go to Single Link
  3. Select Add Link
  4. Select Page on the site from dropdown
  5. Select a page
  6. Add Anchor
  7. Select Update link
  8. Link should display in DRAFT mode
  9. Select Publish

PRs

@GuySartorelli
Copy link
Member Author

Can reproduce this - though some of the steps are a bit odd (why does it say "update link" in the instructions when you haven't even created it, for example?)

@GuySartorelli
Copy link
Member Author

Frustratingly cannot reproduce this locally.
The environment I am able to reproduce it in is https://cmstestm-prod.sites.silverstripe.com/ which is PHP 8.3

@GuySartorelli
Copy link
Member Author

I suspect it is a result of this:

image

The correct URL is https://cmstestm-prod.sites.silverstripe.com/admin/linkfield/data?itemIDs[]=95 (which it does eventually try) but for some reason the ID is split into two for the first request (https://cmstestm-prod.sites.silverstripe.com/admin/linkfield/data?itemIDs[]=9&itemIDs[]=5)

I'll try reproducing locally with IDs in the double digits.

@GuySartorelli
Copy link
Member Author

Can reproduce locally now - getting the exact same split ID problem when running in my local with double-digit IDs.

@emteknetnz
Copy link
Member

Linked PR merged

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

No branches or pull requests

2 participants