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

Seo images don't update mtime when asset settings are changed. #404

Closed
mlathrom opened this issue Apr 15, 2023 · 3 comments
Closed

Seo images don't update mtime when asset settings are changed. #404

mlathrom opened this issue Apr 15, 2023 · 3 comments
Labels

Comments

@mlathrom
Copy link

Describe the bug

The mtime param appended to seo images doesn't take into account changes to asset settings local focal point.

The mtime param is created in line 156 of src/helpers/imageTransform.php. It checks the "dateModified" on the asset. The problem is that "dateModified" only takes into account changes to the actual asset file, not the asset settings. "dateUpdated" checks the asset settings.

To reproduce

Steps to reproduce the behaviour:

  1. Navigate to asset used as an seo image
  2. Change the focal point of that image
  3. Navigate to the page that asset appears in the head of
  4. Check mtime

Expected behaviour

Asset focal point should update in seomatic image meta tags.

Screenshots

If applicable, add screenshots to help explain your problem.

Versions

  • Plugin version: 1.1.56
  • Craft version: 4.4.7.1
@mlathrom mlathrom added the bug label Apr 15, 2023
@mlathrom
Copy link
Author

I've tested a couple of solutions for this.

Remove mtime param
This fixed the issue with assets seomatic images updating when focal point is changed, but I'm not sure if the mtime param was added to solve some other issue.

Check dateModified and dateUpdated and use the newest
This will ensure that changes to the asset file and asset settings are taken into account when adding the mtime param.

@khalwat
Copy link
Collaborator

khalwat commented Apr 16, 2023

This issue has been posted on the old, deprecated Craft 2 SEOmatic plugin repo. Was this intentional?

The version of the plugin you listed does not work with the version of Craft that you listed.

@mlathrom
Copy link
Author

mlathrom commented Apr 16, 2023

No, whoops. Apologies. I'll get it posted on the right one. The issue is for craft-seomatic, I just jumped to the wrong repo through the search.

@mlathrom mlathrom closed this as not planned Won't fix, can't repro, duplicate, stale Apr 16, 2023
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