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

FIX Always include unsaved anchors from the current WYSIWYG field #2742

Conversation

GuySartorelli
Copy link
Member

@GuySartorelli GuySartorelli commented Jun 9, 2022

Follow-up to #2741

In that PR, I accidentally caused a regression where an anchor which has not yet been saved would not be available to link from the same field.

This PR resolves that regression, while still fetching any additional anchors from the server for the current page (i.e. from other fields or DataObjects which have been saved).

Parent issue

@sabina-talipova
Copy link
Contributor

Just small request, could you update this test if it's needed

@GuySartorelli GuySartorelli force-pushed the pulls/4/get-unsaved-anchors-in-current-field branch from 5f7d0aa to ead1d2f Compare June 12, 2022 23:18
@GuySartorelli
Copy link
Member Author

I don't think it's feasible to test this via jest - instead I have added two new behat tests.
Because there are now several tests for anchor links, I've split that off into its own feature file.

Copy link
Contributor

@sabina-talipova sabina-talipova left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works as expected in local environment. Tests passed. APPROVED

@sabina-talipova sabina-talipova merged commit d304ba9 into silverstripe:4 Jun 13, 2022
@sabina-talipova sabina-talipova deleted the pulls/4/get-unsaved-anchors-in-current-field branch June 13, 2022 21:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants