W3C Valid?

  • Posts: 260
  • Thank you received: 25
11 years 8 months ago #92270

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.

  • Posts: 26152
  • Thank you received: 4027
  • MODERATOR
11 years 8 months ago #92295

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.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 260
  • Thank you received: 25
11 years 8 months ago #92297

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: 11 years 8 months ago by sambob.

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

  • Posts: 260
  • Thank you received: 25
11 years 8 months ago #92300

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.

  • Posts: 26152
  • Thank you received: 4027
  • MODERATOR
11 years 8 months ago #92369

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.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 260
  • Thank you received: 25
11 years 8 months ago #92380

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.

  • Posts: 26152
  • Thank you received: 4027
  • MODERATOR
11 years 8 months ago #92503

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.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 260
  • Thank you received: 25
11 years 8 months ago #92783

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.

  • Posts: 260
  • Thank you received: 25
11 years 8 months ago #93369

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

<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:
          <?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: 11 years 8 months ago by Jerome.

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

  • Posts: 26152
  • Thank you received: 4027
  • MODERATOR
11 years 8 months ago #93433

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).

        <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.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 260
  • Thank you received: 25
11 years 8 months ago #93535

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.078 seconds
Powered by Kunena Forum