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

Breaking change in preview targets #9613

Open
aerni opened this issue Feb 28, 2024 · 2 comments
Open

Breaking change in preview targets #9613

aerni opened this issue Feb 28, 2024 · 2 comments

Comments

@aerni
Copy link
Contributor

aerni commented Feb 28, 2024

Bug description

Turns out PR #8742 was a breaking change for me. I've got a preview target that relies on data being augmented in the resolvePreviewTargetUrl method. Augmentation has been removed in that PR.

The seo_social_images_theme is a custom fieldtype wrapper that derives its default value from a subfield.

{site:permalink}/social-images/{seo_social_images_theme}/open_graph/{id}

The field is added to the blueprint on EntryBlueprintFound event. Augmentation made it possible to have the field return its default value even if the field's value hasn't been saved on the entry.

How to reproduce

This is happening as part of my Advanced SEO addon. So there are lots of moving parts and I don't quite know a good way to share how to reproduce this. I'm happy to whip up a basic repo that uses the addon so you can see it in action if that helps.

Logs

No response

Environment

Environment
Application Name: Statamic
Laravel Version: 9.52.16
PHP Version: 8.3.3
Composer Version: 2.7.1
Environment: local
Debug Mode: ENABLED
URL: statamic-advanced-seo.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: 1
Antlers: runtime
Stache Watcher: Enabled
Static Caching: Disabled
Version: 4.44.0 PRO

Statamic Addons
aerni/advanced-seo: dev-fix/multisite

Installation

Fresh statamic/statamic site via CLI

Antlers Parser

None

Additional details

No response

@betty4920taylor
Copy link

betty4920taylor commented Apr 25, 2024

It sounds like PR #8742 introduced a breaking change for your setup, specifically affecting the preview target that relies on data augmentation in the resolvePreviewTargetUrl method. The removal of augmentation in that PR has impacted the functionality you rely on.

The seo_social_images_theme fieldtype wrapper, which derives its default value from a subfield, is also affected. This field is added to the blueprint on the EntryBlueprintFound event, and the augmentation previously allowed the field to return its default value even if the field's value hasn't been saved on the entry.

Regarding reproduction, given the complexity of your setup with the Advanced SEO addon, providing a basic repository using the addon could indeed help in understanding and reproducing the issue more effectively. Catlikesbest

Your environment details are comprehensive, which is helpful for understanding the context of the issue. If you encounter any additional details or updates, feel free to share them for further investigation.

Let me know if you need assistance in creating the repository or if there's anything else I can assist you with.

@jackmcdade
Copy link
Member

@betty4920taylor Hi Ai!

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

No branches or pull requests

4 participants