Coded something up in Couch in an interesting way? Have a snippet or shortcode to share? Post it here for the community to benefit.
36 posts Page 4 of 4
Thanks Tim ! It's perfect :)
Hey Tim, I'm having a weird issue with this, was wondering if you can help.
My minify code is (jquery is already loaded)
Code: Select all
<cms:minify 'js' as='js/script.min.js'>
         mode: 'fade',
         moveSlides: 1,
         slideMargin: 0,
         infiniteLoop: true,
            controls: false,
         minSlides: 1,
         maxSlides: 1,
         speed: 800,
            touchEnabled: false,
            auto: true,
            pause: 6000

Everything works as expected, but the problem is in the error log - every time i visit the page I get this error
Code: Select all
PHP Warning:  filemtime(): stat failed for /home/my_site_path/_|*KCODECHUNK*|_ in /home/my_site_path/couch/addons/minify-js-css/minify.php on line 90

I looked, and the function at line 90 is checking the file modification dates, and invalidating the cache etc if necessary. I'm not using timestamps, and if I comment out the function, the error message stops. Other testing narrowed it down to the stuff inbetween the /*CODE*/ blocks - and the error message was generated no matter what I put in there - even a simple alert.

So, it's not a huge issue (as long as it works!), but I don't like errors when I can't fix them :)
Hopefully I'm not missing anything stupid (as is often the case),
Thanks, @ewanmc. I really appreciate the thorough troubleshooting you did.

What's going on there is that the addon doesn't really care if something in the list is a file or not. As you pointed out, it doesn't make any difference to the functioning of the addon, so I never bothered making any checks. Stray characters or comments (in this case the placeholder for your code chunk) just end up being passed over in the natural course of things.

Maybe my error reporting is set to a less strict standard, but I never noticed the warnings being generated. At any rate, I added some checks on whether something in the list is a file or not, so as to avoid throwing the warnings you discovered.

The addon has been updated on the forum and on GitHub.
No worries Tim.
The only reason I noticed it was that I was actively working on a site (trying to improve the SEO ranking), and I noticed the error log kept increasing in size! So I don't really have strict error control standards...
Thanks for your help and a great addition to couch!
Failed to load resource: the server responded with a status of 404 (Not Found)

help me...the output file error...
Sorry for your trouble. Your post doesn't give enough information to help very much with troubleshooting.

First, open the problem page and use the browser to view the source code for the page. Find the line where the CSS or JS file is linked and see if there is a problem with the URL.

Next look at the files on your server and see if the new file has been created.

You may be able to figure out the problem on your own by looking at these two things. Otherwise, please post your cms:minimize code and the HTML code that the page outputs so we can help to solve this problem for you.
36 posts Page 4 of 4

Who is online

In total there are 5 users online :: 0 registered, 0 hidden and 5 guests
(based on users active over the past 5 minutes)

Users browsing this forum: No registered users and 5 guests