Jump to content

Validator does not see the added content


Rigodon

Recommended Posts

Hello,

For all the subpages with the parameter of the GET charged me with some content-dependent file name of the page and the selected language. The problem is not the script but its visibility through the validator, because on this website, does not see the validator that the party index_content has been loaded and displays the code as:

 

<table class="contentpaneopen">   // there should be loaded index file content, and indeed it is, but the validator can not see
</table>


https://validator.w3.org/check?uri=http%3A%2F%2Fprzembud.itecore.com%2F&charset=%28detect+automatically%29&doctype=Inline&ss=1&outline=1&group=0&No200=1&verbose=1&st=1&user-agent=W3C_Validator%2F1.3+http%3A%2F%2Fvalidator.w3.org%2Fservices
 

 
 
My code of index.php (the only important part):


            

 <table class="contentpaneopen">

                                        <?php
                                        $album = $_GET['album'];

                                        if (!empty($page) && empty($album)) {
                                            include ($langs . '/' . $page . '.php');
                                        } else if (($page == 'gallery_album') && !empty($album)) {
                                            include ( 'galeria/' . $album . '.html');
                                        } else if (empty($page) && empty($album)) {

                                            include ($langs . '/' . 'index_content.php');
                                        } else {
                                            include ($langs . '/' . 'index_content.php');
                                        }
                                        ?>



                                    </table>

Once again, the page works properly index the content is loading, but why validator can not see? how to make saw. And if not, how to eliminate a bug in validatorze, but without deleting the table, just by typing there something that does not spoil other subpages, and does not add any apparent content. :>

Link to comment
Share on other sites

If the HTML is loaded from PHP then it should not matter. But, you can try saving the HTML file and then uploading it to the validator.

 

But, that is kind of an old school thing - nobody really cares about validated HTML anymore. Browsers are smart enough to figure out minor problems most of the time.

Link to comment
Share on other sites

Once again, the page works properly index the content is loading, but why validator can not see?

 

Did you scroll down to the "Source Listing" section? When I click on the W3C link provided in you post, I see content between the open and close table tags.

 

Note that you need to include the GET variables when validating the other versions of the page. If you want to test the gallery_album page, for example, the validator needs the full link (including the GET variables):

http://przembud.itecore.com/?page=gallery_album

 

The validation results for the gallery_album page can be viewed here:

https://validator.w3.org/check?uri=http%3A%2F%2Fprzembud.itecore.com%2F%3Fpage%3Dgallery_album&charset=%28detect+automatically%29&doctype=Inline&ss=1&outline=1&group=0&No200=1&verbose=1&st=1&user-agent=W3C_Validator%2F1.3+http%3A%2F%2Fvalidator.w3.org%2Fservices

Link to comment
Share on other sites

If the HTML is loaded from PHP then it should not matter. But, you can try saving the HTML file and then uploading it to the validator.

 

But, that is kind of an old school thing - nobody really cares about validated HTML anymore. Browsers are smart enough to figure out minor problems most of the time.

 

While browsers do what they can to fix problems, they don't always get it right. It's best to validate your pages so it's one less variable you need to worry when something unexpected happens.

 

For anyone interested, the following page provides some reasons to validate your code:

https://validator.w3.org/docs/why.html

Link to comment
Share on other sites

I'm just saying not to worry all that much if your HTML is perfectly valid. Obviously if you're missing closing tags, aren't nesting properly, missing closing attribute quotes, etc then those are problems you should fix. The browser probably won't care, but it's still bad. A modern IDE will alert you to most of the big offenders.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.