My pages are using a php script to write the image into the page to prevent access to the files themselves. Is it possible to configure Batch wizard to ignore this either for a specific filename, e.g. picture.php?54 228:29 http://newcastlecameraclub.org/picture.php?src=296 Check media type img src - Expected an image media type but got "text/html"; alt text is "Buzzard Feeding", missing height and width
"Check media type" configuration for Batch Wizard
-
- Rank II - Novice
- Posts: 40
- Joined: Tue Feb 01, 2005 5:47 am
- Location: Newcastle under Lyme, UK
"Check media type" configuration for Batch Wizard
Batch wizard is giving me a lot of the following when it does a link check:
-
- Site Admin
- Posts: 3785
- Joined: Sat Dec 11, 2004 9:23 am
- Location: Near Dallas, TX
Re: "Check media type" configuration for Batch Wizard
Hello,
If your script is outputting an image, then shouldn't it set the proper media type? Like image/jpeg?
Something like (before any other output):
If your script is outputting an image, then shouldn't it set the proper media type? Like image/jpeg?
Something like (before any other output):
Code: Select all
header('Content-Type: image/jpeg');
Albert Wiersch, CSS HTML Validator Developer • Download CSS HTML Validator FREE Trial
-
- Rank II - Novice
- Posts: 40
- Joined: Tue Feb 01, 2005 5:47 am
- Location: Newcastle under Lyme, UK
Re: "Check media type" configuration for Batch Wizard
Thanks, I'll look into that.
-
- Rank II - Novice
- Posts: 40
- Joined: Tue Feb 01, 2005 5:47 am
- Location: Newcastle under Lyme, UK
Re: "Check media type" configuration for Batch Wizard
I've added
header('Content-type: image/jpeg');
immediately before
ImageJPEG($im); in the script that creates the image, but that has made no difference.
Off to Stackoverflow now to see if there are any suggestions there!
header('Content-type: image/jpeg');
immediately before
ImageJPEG($im); in the script that creates the image, but that has made no difference.
Off to Stackoverflow now to see if there are any suggestions there!
-
- Site Admin
- Posts: 3785
- Joined: Sat Dec 11, 2004 9:23 am
- Location: Near Dallas, TX
Re: "Check media type" configuration for Batch Wizard
I checked your link and it still says the content-type is text/html.
It could be that you need to use header() sooner.
The PHP manual says:
It could be that you need to use header() sooner.
The PHP manual says:
Good luck! Please let us know how it goes.Remember that header() must be called before any actual output is sent, either by normal HTML tags, blank lines in a file, or from PHP. It is a very common error to read code with include(), or require(), functions, or another file access function, and have spaces or empty lines that are output before header() is called. The same problem exists when using a single PHP/HTML file.
Albert Wiersch, CSS HTML Validator Developer • Download CSS HTML Validator FREE Trial
-
- Rank 0 - Newcomer
- Posts: 5
- Joined: Fri May 01, 2009 8:04 pm
- Location: SF Bay Area
Re: "Check media type" configuration for Batch Wizard
I'm having the same issue, getting thousands of these errors being thrown. Is there a way to exclude this from the report, at present it's not something my client will fix and it's making the report kind of useless because the other good data is getting buried.
-
- Site Admin
- Posts: 3785
- Joined: Sat Dec 11, 2004 9:23 am
- Location: Near Dallas, TX
Re: "Check media type" configuration for Batch Wizard
Hello,
The easiest way may be exclude the links from being checked in the Exclusions tab of the Batch Wizard. Add the links to exclude in the 'Don't check these links' option. However, there could be a problem if all the links can't easily be specified here (like if there are many) and it will disable all link checking for these links - not just the media type checking.
Would an option to disable media type checking be useful here? Perhaps I could add a new tab in the Batch Wizard called Advanced Options and include an option to disable media type checking for links... or some other way to disable this feature.
Of course I have to note here that it's always better to fix the problems than ignore them.
The easiest way may be exclude the links from being checked in the Exclusions tab of the Batch Wizard. Add the links to exclude in the 'Don't check these links' option. However, there could be a problem if all the links can't easily be specified here (like if there are many) and it will disable all link checking for these links - not just the media type checking.
Would an option to disable media type checking be useful here? Perhaps I could add a new tab in the Batch Wizard called Advanced Options and include an option to disable media type checking for links... or some other way to disable this feature.
Of course I have to note here that it's always better to fix the problems than ignore them.
Albert Wiersch, CSS HTML Validator Developer • Download CSS HTML Validator FREE Trial
-
- Rank 0 - Newcomer
- Posts: 5
- Joined: Fri May 01, 2009 8:04 pm
- Location: SF Bay Area
Re: "Check media type" configuration for Batch Wizard
That would be amazing if you could add an advanced option to disable this. I agree it is better to fix the problem, but they don't fix the problems in the order I specify, they do them in the priority of what is affecting their users. This particular error has no effect on the user but a huge effect on the report.
There are thousands of them so not easy to create an exclusions list.
There are thousands of them so not easy to create an exclusions list.
-
- Site Admin
- Posts: 3785
- Joined: Sat Dec 11, 2004 9:23 am
- Location: Near Dallas, TX
Re: "Check media type" configuration for Batch Wizard
Thanks. I'll look into adding this option and get back to you.
Albert Wiersch, CSS HTML Validator Developer • Download CSS HTML Validator FREE Trial
-
- Rank II - Novice
- Posts: 40
- Joined: Tue Feb 01, 2005 5:47 am
- Location: Newcastle under Lyme, UK
Re: "Check media type" configuration for Batch Wizard
I'd find it useful too, especially as I hadn't had a chance to prevent the problem by altering my code. As mackro says, clients often have other priorities.
-
- Site Admin
- Posts: 3785
- Joined: Sat Dec 11, 2004 9:23 am
- Location: Near Dallas, TX
Re: "Check media type" configuration for Batch Wizard
Hello,mackro wrote:That would be amazing if you could add an advanced option to disable this. I agree it is better to fix the problem, but they don't fix the problems in the order I specify, they do them in the priority of what is affecting their users. This particular error has no effect on the user but a huge effect on the report.
There are thousands of them so not easy to create an exclusions list.
Please try redownloading CSE HTML Validator Enterprise from here:
https://www.htmlvalidator.com/download/registered.php
It says v15.0100 is available but you should get v15.0112 if you download it.
There is a new "Advanced" tab in the Batch Wizard with an option that you can check to disable link media type checking. Please check that option, rerun the Batch Wizard job, and see if resolved the issue. Please let me know. Thanks!
Albert Wiersch, CSS HTML Validator Developer • Download CSS HTML Validator FREE Trial
-
- Rank 0 - Newcomer
- Posts: 5
- Joined: Fri May 01, 2009 8:04 pm
- Location: SF Bay Area
Re: "Check media type" configuration for Batch Wizard
Hi Albert,
I was able to dl the new version and check the checkbox. Didn't have any effect on the scan though, just as many of the check media type errors coming up...
I was able to dl the new version and check the checkbox. Didn't have any effect on the scan though, just as many of the check media type errors coming up...
-
- Site Admin
- Posts: 3785
- Joined: Sat Dec 11, 2004 9:23 am
- Location: Near Dallas, TX
Re: "Check media type" configuration for Batch Wizard
Sorry it didn't work. Can you send me a sample from the Batch Wizard report so I can see exactly what errors you are seeing? It might be easiest to send it via attachment to support at htmlvalidator.com.
Albert Wiersch, CSS HTML Validator Developer • Download CSS HTML Validator FREE Trial
-
- Rank 0 - Newcomer
- Posts: 5
- Joined: Fri May 01, 2009 8:04 pm
- Location: SF Bay Area
Re: "Check media type" configuration for Batch Wizard
emailing now.
-
- Site Admin
- Posts: 3785
- Joined: Sat Dec 11, 2004 9:23 am
- Location: Near Dallas, TX
Re: "Check media type" configuration for Batch Wizard
A new option in a new Advanced tab in the Batch Wizard is now available to disable link media type checking. Registered users who don't want to wait can get the latest update by downloading the pro or enterprise edition from the registered user download page on the website, or just wait until we go public with the new version update so it can be automatically downloaded and installed by the new updating system in v15.
Albert Wiersch, CSS HTML Validator Developer • Download CSS HTML Validator FREE Trial