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

Additional information for server-side setup: must disable Cake asset timestamping #39

Closed
jrbakooba opened this issue Apr 29, 2022 · 7 comments · Fixed by #43
Closed
Labels
bug Something isn't working cake4 Specifies that the issue/pr is specific to master(cake4) branch good first issue Good for newcomers Hacktoberfest

Comments

@jrbakooba
Copy link

Is your feature request related to a problem? Please describe.
Yes, a problem I had while setting up this library on a Cake3 application. With asset timestamping (Asset.timestamp => true or 'force' in app.php) enabled, AssetMix will fail to find the manifest. This is because Cake appends a timestamp to the end of the asset URL which means the "path" is not found in the mix manifest.

I'm new to this plugin and to mix/manifests in general, so I apologize if my terminology is inaccurate.

Describe the solution you'd like
Either update the docs to indicate that this setting should be turned off OR find a way for the manifest loader to ignore the timestamp in the query string when loading the asset file.

Describe alternatives you've considered
N/A

Additional context
Screen Shot 2022-04-29 at 10 30 35

@ishanvyas22
Copy link
Owner

Hey @jrbakooba, I think this can be handled in the package by trimming out the timestamp. I will take this up once I get a chance. PR is also appreciated.

@ishanvyas22 ishanvyas22 added the bug Something isn't working label Apr 29, 2022
@jrbakooba
Copy link
Author

Sure, happy to put together a PR.

Do you think it makes the most sense to just check for the query string and strip it? Or should we try to be cleverer about it somehow? I'm brand-new to the library so I'm not sure of the full scope of what the right fix might be.

Ideas welcome, and I can write the patch.

@ishanvyas22
Copy link
Owner

Yeah, just checking for query string and strip out the content after it would work as of now.

@jrbakooba
Copy link
Author

@ishanvyas22 I've added tests to my branch, many apologies for the delay.

@ishanvyas22
Copy link
Owner

Fixed for CakePHP 3. Need to port to CakePHP 4.x.

@ishanvyas22 ishanvyas22 added good first issue Good for newcomers cake4 Specifies that the issue/pr is specific to master(cake4) branch labels Aug 12, 2022
@github-actions
Copy link

This issue is stale because it has been open for 120 days with no activity. Remove the stale label or comment or this will be closed in 15 days

@github-actions
Copy link

This issue is stale because it has been open for 120 days with no activity. Remove the stale label or comment or this will be closed in 15 days

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working cake4 Specifies that the issue/pr is specific to master(cake4) branch good first issue Good for newcomers Hacktoberfest
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants