Elxis CMS Forum

Support => General => Topic started by: xmanhattan on July 24, 2016, 11:18:27

Title: html validation and meta description tag
Post by: xmanhattan on July 24, 2016, 11:18:27
Hello all,

I was checking to see if my changes to html for the flex template was valid and the validator found a meta tag error.

https://validator.w3.org (https://validator.w3.org) displays this
Code: [Select]
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> as
Quote
Error: A document must not include both a meta element with an http-equiv attribute whose value is content-type, and a meta element with a charset attribute.
but only for the /el side of the site.

Additionally I would like to ask where (what file) the meta description is getting the information from?
I noticed that at the end of the description from looking at the browser source the words home, elxis (and on the Greek side) are appended.  These are not in the description line of the configuration or in the private $METAKEYS of the configuration.php file.


Title: Re: html validation and meta description tag
Post by: datahell on July 24, 2016, 19:51:12
Peter do this change.
Open file includes/libraries/elxis/document.class.php
go to line 88:
$this->meta['http-equiv']['content-type'] = $this->contenttype.'; charset=utf-8';

and change it to:
if (isset($this->meta['charset'])) {
   $this->meta['http-equiv']['content-type'] = $this->contenttype;
} else {
   $this->meta['http-equiv']['content-type'] = $this->contenttype.'; charset=utf-8';
}

I will update Elxis 4.5 release with this fix.
Thanks for the report!


The meta keys are set (usually) by the current component. If you are talking about component content pages then the meta keys are set by that component. If the provided meta keys are not enough, the component tries adds some more. But this depends on the component.

Tip: set at least 10 meta keywords in Elxis configuration and component Content will not add more.
Title: Re: html validation and meta description tag
Post by: xmanhattan on July 25, 2016, 09:28:08
Datahell, terrific as usual, works great!