Skip to main content

W3C Valid?

More
13 years 7 months ago #92270 by sambob
W3C Valid? was created by sambob
Hi guys,

Site

A bit stuck on getting site W3C valid and done most but shop is throwing up a couple of curly ones I am not sure how to sold

Here is the validator results

What seems to be happening is the category 'table' is creating a width attribute that is creating a conflict.

Any clues on these? I would REALLY love to have my site W3C valid.

Don't look at what is and ask 'why?'; look at what isn't and ask 'Why Not!'

Please Log in or Create an account to join the conversation.

More
13 years 7 months ago #92295 by Jerome
Replied by Jerome on topic W3C Valid?
Hi,

Some points could be fix using view override but I saw points which are not linked to HikaShop (like the meta "title" and some "alt" for images in your footer).
The width of the table is set in the view too, so you can change it from width="..." to style="width:...." in order to be compatible with the HTML5 standard.

Regards,

Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Please Log in or Create an account to join the conversation.

More
13 years 7 months ago - 13 years 7 months ago #92297 by sambob
Replied by sambob on topic W3C Valid?
Hi Jerome, appreciate your reply...

which view do I need to edit?

I dont seem to be able to find width=

Don't look at what is and ask 'why?'; look at what isn't and ask 'Why Not!'
Last edit: 13 years 7 months ago by sambob.

Please Log in or Create an account to join the conversation.

More
13 years 7 months ago #92300 by sambob
Replied by sambob on topic W3C Valid?
ok I have it down to seven (from 42)

Main culprits remain:

6 errors
Element p not allowed as child of element span in this context. (Suppressing further errors from this subtree.)

<!-- EO CATEGORY DESC -->

Contexts in which element p may be used:
Where flow content is expected.
Content model for element span:
Phrasing content.

I have unpublished the categories (so they dont display) and these error dissapear.

Any clues?

Don't look at what is and ask 'why?'; look at what isn't and ask 'Why Not!'

Please Log in or Create an account to join the conversation.

More
13 years 7 months ago #92369 by Jerome
Replied by Jerome on topic W3C Valid?
Hi,

The W3C Html Validator does not display right line number.
The error is on the line just before.

Regards,

Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Please Log in or Create an account to join the conversation.

More
13 years 7 months ago #92380 by sambob
Replied by sambob on topic W3C Valid?
Sorry, not sure what you mean...

But, as mentioned, if I unpublished shop categories, it validates.

Don't look at what is and ask 'why?'; look at what isn't and ask 'Why Not!'

Please Log in or Create an account to join the conversation.

More
13 years 7 months ago #92503 by Jerome
Replied by Jerome on topic W3C Valid?
Hi,

You can edit the category listing view.
Just have to check which category listing your website use and edit the corresponding view in order to make it valid for the W3C (on HTML5).

I think it will be "category | listing_img_desc".

Regards,

Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Please Log in or Create an account to join the conversation.

More
13 years 7 months ago #92783 by sambob
Replied by sambob on topic W3C Valid?
Hi Jerome, yes already edited that and created the required CSS entry to compensate.

No idea were the so-called <p> conflict is coming from.

As mentioned.. If I unpublished all categories and the issue disappears.

Turn them on and it wont validate.

Don't look at what is and ask 'why?'; look at what isn't and ask 'Why Not!'

Please Log in or Create an account to join the conversation.

More
13 years 6 months ago - 13 years 6 months ago #93369 by sambob
Replied by sambob on topic W3C Valid?
ok... done a lot of digging on this.

It is an issue with the img_desc file.

If I revert to Image & Title, those errors dissapear.

The error is that there is a <p> element with the span class. The <P> element comes from the description of the category.

So if I remove the span class, the errors go.

So
Code:
<span class="hikashop_category_desc" style="text-align:<?php echo $this->align; ?>;"> <?php echo preg_replace('#<hr *id="system-readmore" */>.*#is','',$this->row->category_description); ?> </span>
Becomes:
Code:
<?php echo preg_replace('#<hr *id="system-readmore" */>.*#is','',$this->row->category_description); ?>
does that create any problems that you can think of?

Don't look at what is and ask 'why?'; look at what isn't and ask 'Why Not!'
Last edit: 13 years 6 months ago by Jerome.

Please Log in or Create an account to join the conversation.

More
13 years 6 months ago #93433 by Jerome
Replied by Jerome on topic W3C Valid?
Hi,

It could create a CSS problem if you have some rules on the class "hikashop_category_desc".
I think you can replace the "span" by another type of block, like a "div" (which could have "p" elements into).
Code:
<div class="hikashop_category_desc" style="text-align:<?php echo $this->align; ?>;"> <?php echo preg_replace('#<hr *id="system-readmore" */>.*#is','',$this->row->category_description); ?> </div>
Regards,

Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Please Log in or Create an account to join the conversation.

More
13 years 6 months ago #93535 by sambob
Replied by sambob on topic W3C Valid?
That did it! (And much better than my hack ;) )

Thanks again Jerome, greatly appreciated.

Great service as always!

Don't look at what is and ask 'why?'; look at what isn't and ask 'Why Not!'

Please Log in or Create an account to join the conversation.

Time to create page: 0.222 seconds
Powered by Kunena Forum