-
Notifications
You must be signed in to change notification settings - Fork 101
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
PHP files not being rewritten #214
Comments
Can you create a basic test case for this in a PR and I can go about fixing the issue |
I'm not sure I know what you mean by that and how to do it. (I'm not exactly a JS expert.) However, I seem to have narrowed it down quite a bit. The CMS used in this particular project uses a PHP statement to emit the correct path to the assets directory. The reduced test case for this would be <!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="<?php echo $config->urls->templates?>css/master.css">
</head>
<body>
<script src="<?php echo $config->urls->templates?>js/master.js"></script>
</body>
</html> If I remove the If that does not help, I'd need clear instructions as to what you from me need to be able to test this. |
Yes, it would appear that |
Yeah, already pinned it to 1.4.1. Thanks. |
Hmm since we do not known what I considered this case broken, but when people are using it... |
There were implementations before v1 which would replace terms like this to a base directory so it could be parsed correctly. It was removed in favour of a simpler "this is the absolute path of a file and replace all references with the new one". I don't see a way around this to be honest without bringing back some aspects of v0.x.x which were removed for a reason. Saying that, one way I thought of was to have a |
How about an option If 1.5 breaks existing installs, it might have been better to use version 2.0.0 to signal that break? |
I updated today to the 1.5 version and I'm experiencing this issue as well, besides others.
And it manages to create the file with the hash, but doesn't update the reference anyway. |
@carlotrimarchi I'm very low on time to create fixes, but I added some test cases which failed and fixed those. Could you provide a test case for the simple url you mention? I want to fix normal path issues first, then see if we can find a solution to stuff like php tags in urls. |
and
WordPress pulls in assets via the above tags in the header.php and footer.php files respectively. While the asset files are being rewritten without the
option, setting the
should append the busting strings to the referencing files but that does not happen. Even when the query string is set to false, the references in the php files are not updated either. What's to be done? |
I have a project in which a PHP file is no longer being rewritten by the grunt task since updating from 1.4.1 to 1.5.0. Hashing the (CSS/JS) assets works fine, but the references to those assets are no longer updated properly in the file.
According to my tests, it does not matter that it's a
.php
file or that the file name contains an underscore (or other special characters). It seems to have something to do with the actual content of the.php
files, but I can't figure out what it is.I use node 4.7.0 and grunt 1.0.1 on Mac OS 10.12.2.
The text was updated successfully, but these errors were encountered: