It's essentially the same issue as mentioned here: https://github.com/wpengine/faustjs/issues/1916. I just want to point out that it is still present and that @faustwp/blocks@4.0.0 could be updated to either add the legacyBehavior flag proposed in the Next.js docs or simply remove the creation of the anchor tag within the CoreButton block. Perhaps it is not safe to assume that Next.js 13 or higher is in use, but even the faust.js example repositories are using Next.js version 14 or higher. If someone chooses to use Next.js version less than 13 with faustjs, they should be aware of the risks and security issues associated with using old packages, and they should probably use @faustwp/blocks package of a version less than 4. The latest @faustwp/blocks package should align with the latest Next.js version and therefore comply with any of the proposed solutions in https://nextjs.org/docs/messages/invalid-new-link-with-extra-anchor.
Thank you for considering my proposal for improvement of @faustwp/blocks package.
Steps to reproduce
Set up faust with block support and next.js version >14
Description
When the CoreButton block is used and the link value is set, Next.js complains about: Invalid
<Link>
with<a>
child. More information about the issue can be found at https://nextjs.org/docs/messages/invalid-new-link-with-extra-anchor.It's essentially the same issue as mentioned here: https://github.com/wpengine/faustjs/issues/1916. I just want to point out that it is still present and that @faustwp/blocks@4.0.0 could be updated to either add the
legacyBehavior
flag proposed in the Next.js docs or simply remove the creation of the anchor tag within the CoreButton block. Perhaps it is not safe to assume that Next.js 13 or higher is in use, but even the faust.js example repositories are using Next.js version 14 or higher. If someone chooses to use Next.js version less than 13 with faustjs, they should be aware of the risks and security issues associated with using old packages, and they should probably use @faustwp/blocks package of a version less than 4. The latest @faustwp/blocks package should align with the latest Next.js version and therefore comply with any of the proposed solutions in https://nextjs.org/docs/messages/invalid-new-link-with-extra-anchor.Thank you for considering my proposal for improvement of @faustwp/blocks package.
Steps to reproduce
Additional context
No response
@faustwp/core Version
3.0.3
@faustwp/cli Version
3.0.2
FaustWP Plugin Version
1.3.2
WordPress Version
6.5.5
Additional environment details
@faustwp/blocks": "4.0.0"
Please confirm that you have searched existing issues in the repo.