Meta Charset Duplicated In Maintenance Mode - Question | JoomShaper
🎃 Halloween Sale is Live! Get 35% OFF on all plans. Sale ends soon! Get Offer

Meta Charset Duplicated In Maintenance Mode

D

David

Helix Framework 6 months ago

Hello,

I'm building a new website, and when I activate the "maintenance mode" I notice in the source code that this line is duplicated:

<meta charset="utf-8">

The beginning of the source code looks like this:

<!doctype html>
<html class="coming-soon" lang="es" dir="ltr">
    <head>
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
        <meta charset="utf-8">
        ...

I have been doing some research and I think the problem is in line 48 of the file:

\plugins\system\helixultimate\overrides\layouts\comingsoon.php

This meta tag is included here, and subsequently a call is made, in line 51, to:

$theme->head();

This call will end up calling the MetasRender that will add the duplicated meta tag again.

\libraries\src\Document\Renderer\Html\MetasRenderer.php

Lines 99-102:

// Generate charset when using HTML5 (should happen first)
        if ($this->_doc->isHtml5()) {
            $buffer .= $tab . '<meta charset="' . $this->_doc->getCharset() . '">' . $lnEnd;
        }

Joomla: 5.2.6 Helix Ultimate: 2.1.2

0
5 Answers
Toufiq
Toufiq
Accepted Answer
Senior Staff 6 months ago #190958

Hi there,

Thank you for reaching out, and I apologize for any inconvenience caused by this oversight. Can you produce the issue on this URL?

Best regards,

Toufiqur Rahman (Team Lead, Support)

0
Toufiq
Toufiq
Accepted Answer
Senior Staff 6 months ago #190978

I will inform our team. Thank you

0
D
David
Accepted Answer
6 months ago #190965

Hello Toufiq,

I've already reproduced the issue.

I've simply changed in backend:

Global Configuration > Site
   Site Offline: Yes

And now the source code has this:

<!doctype html>
<html class="coming-soon" lang="en-gb" dir="ltr">
    <head>
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
        <meta charset="utf-8">
    <meta name="generator" content="Helix Ultimate - The Most Popular Joomla! Template Framework.">
    <title>Home</title>
    ...

As I mentioned in the first message, the solution is to delete line 48 in this file.

\plugins\system\helixultimate\overrides\layouts\comingsoon.php
0
Toufiq
Toufiq
Accepted Answer
Senior Staff 6 months ago #190974

plugins/system/helixultimate/overrides/layouts/comingsoon.php

Find out this code from this file location & remove this code.

https://prnt.sc/LjYRPucb_mdy

<meta charset="utf-8">

0
D
David
Accepted Answer
6 months ago #190975

Yes, that's exactly what I was telling you.

I already had the fix done in my project, I just reported it here so you can add it to the list of fixes for the next release of Helix Ultimate :)

0