Comments (6)
Breaking change here: https://github.com/laravel/nova/commit/558156753b2772638e537bc1a468b281ce361e3a#diff-4f97552ae74c24e92b54d327885cc4b4
I have quite a few patches that I use because updates to Nova constantly breaks 3rd party plugins.
Not sure if Nova::script() or Nova::style() are meant to be used with remote files but certainly filemtime() didn't appear to work with remote urls - at least, not in my tests on different versions of php with php.ini setting allow_url_fopen = On
.
My (temporary & not perfect) patch for this issue:
--- vendor/laravel/nova/src/Http/Controllers/StyleController.php 2019-12-15 11:37:08.000000000 +1300
+++ vendor/laravel/nova/src/Http/Controllers/StyleController.new.php 2019-12-15 11:37:43.000000000 +1300
@@ -30,6 +30,6 @@
[
'Content-Type' => 'text/css',
]
- )->setLastModified(DateTime::createFromFormat('U', filemtime($path)));
+ )->setLastModified(DateTime::createFromFormat('U', @filemtime($path) ?: now()->timestamp));
}
}
--- vendor/laravel/nova/src/Http/Controllers/ScriptController.php 2019-12-15 11:36:13.000000000 +1300
+++ vendor/laravel/nova/src/Http/Controllers/ScriptController.new.php 2019-12-15 11:36:54.000000000 +1300
@@ -30,6 +30,6 @@
[
'Content-Type' => 'application/javascript',
]
- )->setLastModified(DateTime::createFromFormat('U', filemtime($path)));
+ )->setLastModified(DateTime::createFromFormat('U', @filemtime($path) ?: now()->timestamp));
}
}
Use the patch with patch -p0 -N < patch-file-name
.
from nova-froala-field.
Could you try it now? Maybe it was an issue on cdn.jsdelivr.net
from nova-froala-field.
I don't think you can run filemtime on remote files. Probably need to include the styles in the package.
from nova-froala-field.
@1destiny - thanks. Have you PR:ed it into nova itself?
from nova-froala-field.
Do you think it's better to include the styles in the package instead of waiting for Nova to fix the remote files issue?
from nova-froala-field.
Fixed in 3.3.0
from nova-froala-field.
Related Issues (20)
- proc_open error when uploading an image HOT 1
- 404 on JSON field HOT 1
- Google Cloud Storage Support HOT 2
- json field HOT 4
- Gallery Support question HOT 5
- Remove Powered by Froala HOT 2
- Is a Commercial License Required? HOT 1
- Customize Attachment Handlers Throws error HOT 2
- JSON fields throws 404 error HOT 4
- Uncaught SyntaxError: Unexpected end of input HOT 1
- How to make use of plugin options such as linkAlwaysBlank HOT 1
- Content saved in 'html' view are not persisting HOT 1
- Not support upload .svg images HOT 2
- nova-froala-field:1 Uncaught TypeError: Cannot read property 'getBoundingClientRect' of undefined HOT 2
- Froala field disappears while typing
- Field Help Text does not show
- Help Please! Cannot install using composer
- Missing prevent from abandonment support
- Composer install hangs in fork HOT 1
- Outdated froala-editor version in dist HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nova-froala-field.