Skip Navigation

[Resolved] HTML validator error on start page. Problem with loading styles for google maps

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Tagged: 

This topic contains 4 replies, has 2 voices.

Last updated by PZ 3 years, 5 months ago.

Assigned support staff: Nigel.

Author
Posts
#588405

PZ

Please check:
hidden link

After the update of one of Toolset plugins there is this error visible when validating the start page: hidden link with validator.w3.org:

Error: Element style not allowed as child of element body in this context. (Suppressing further errors from this subtree.)

Could you help me remove that error? Maps are used only in specific subpages. Is it possible to enable loading this css style only there?

#588534

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+01:00)

Hi there

You are right, the CSS fixes added by the Maps plugin are added to the body (not valid) rather than the head (valid).

I can't see why it has been done like that and have requested that this be changed.

I spoke with the developers the other day about removing the action which adds this CSS on pages where it is needed and they confirmed that the action is added in such a way that it cannot be removed.

So, currently there is no way to fix this I'm afraid.

I am escalating your thread so the issue can be investigated further, and I'll update you when there is any news.

Thanks for your patience.

#588628

PZ

Thanks a lot. I suppose this code loads in every subpage (although I haven't checked that). Could you provide me with some code snippet (to insert into function.php file) to remove the unnecessary source code from the main page only?

#588636

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+01:00)

Sorry, I can't. The way the CSS is added it is impossible to remove without disabling the maps plugin entirely.

I raised this issue with the developers the other day who confirmed that is currently the case.

But they should be able to fix adding the CSS to the head rather than the body so that the page validates, but we'll need to wait for them to confirm that.

#588828

PZ

OK, waiting patiently then. Thanks.