nystudio107 / craft-seomatic

SEOmatic facilitates modern SEO best practices & implementation for Craft CMS 3. It is a turnkey SEO system that is comprehensive, powerful, and flexible.
https://nystudio107.com/plugins/seomatic
Other
162 stars 68 forks source link

SEOMatic tags don't auto render on website #1448

Closed franck-thorck closed 2 months ago

franck-thorck commented 3 months ago

Describe the bug

Even if "Automatic Render Enabled" is activated in the plugin options, whether in a production or local environment, no SEO element will render on the frontend site.

The GTM no longer displays. Title, site name, description and other data are no longer displayed.

The plugin in production is in "live" mode. In the local environment, whether in "live" or "local" mode, nothing is displayed.

I've tried to remove as much content as possible in the head and at the end of the body that could interfere with it. Locally, I've done all the updates, but nothing works. I've deleted all possible caches, still nothing.

Only the preview in the CMS is working.

I've run out of ideas. Can anyone help me?

Thanks a lot.

To reproduce

Steps to reproduce the behaviour:

  1. Go to docbraces.com
  2. You will see only docbraces.com as Title and no tag in the source code whereas everything is setup in the CMS and "live"</li> </ol> <h3>Expected behaviour</h3> <p>SEOMatic auto render all data.</p> <h3>Screenshots</h3> <img width="1048" alt="Capture d’écran, le 2024-04-03 à 17 33 30" src="https://github.com/nystudio107/craft-seomatic/assets/117709151/1c15437c-3d30-4219-bc88-259183298945"> <img width="812" alt="Capture d’écran, le 2024-04-03 à 17 33 54" src="https://github.com/nystudio107/craft-seomatic/assets/117709151/208b51d8-7cd7-47e3-9c38-0e3d9e345f6d"> <img width="806" alt="Capture d’écran, le 2024-04-03 à 17 34 06" src="https://github.com/nystudio107/craft-seomatic/assets/117709151/603f4d38-5bc4-491c-a505-a8cd7f5b9f1d"> <h3>Versions</h3> <p>Production:</p> <ul> <li>Plugin version: 4.0.0</li> <li>Craft version: 4.4.16.1</li> </ul> <p>Local:</p> <ul> <li>Plugin version: 4.0.45</li> <li>Craft version: 4.8.6</li> </ul> </div> </div> <div class="comment"> <div class="user"> <a rel="noreferrer nofollow" target="_blank" href="https://github.com/khalwat"><img src="https://avatars.githubusercontent.com/u/7570798?v=4" />khalwat</a> commented <strong> 2 months ago</strong> </div> <div class="markdown-body"> <p>Well, I am seeing that the JSON-LD is rendering properly on the page, so SEOmatic is active, and doing it's thing:</p> <pre><code class="language-html"><script type="application/ld+json">{"@context":"http://schema.org","@graph":[{"@type":"WebSite","author":{"@id":"https://docbraces.com#identity"},"copyrightHolder":{"@id":"https://docbraces.com#identity"},"copyrightYear":"2022","creator":{"@id":"https://docbraces.com#creator"},"dateModified":"2024-02-01T15:33:22-05:00","datePublished":"2022-10-19T02:54:00-04:00","description":"Our orthodontic experts and proven treatment methods create beautiful smiles, one patient at a time!","headline":"Creating confident smiles that last a lifetime.","image":{"@type":"ImageObject","url":"https://docbraces.com/files/common/Social/_1200x630_crop_center-center_82_none/DOCBRACES_1200x628.jpg?mtime=1690497422"},"inLanguage":"en","mainEntityOfPage":"https://docbraces.com/","name":"Creating confident smiles that last a lifetime.","publisher":{"@id":"https://docbraces.com#creator"},"url":"https://docbraces.com"},{"@id":"https://docbraces.com#identity","@type":"Organization","address":{"@type":"PostalAddress","addressCountry":"Canada","addressLocality":"Etobicoke","addressRegion":"Ontario","postalCode":"M9C 5J5","streetAddress":"401 The West Mall, Suite 301, Etobicoke, ON"},"alternateName":"Canadian Orthodontic Partners","description":"Docbraces is a leading orthodontic specialist clinic network, providing advanced, customized treatment options in comfortable, patient-focused environments.","email":"info@docbraces.com","image":{"@type":"ImageObject","height":"70","url":"https://docbraces.com/files/common/Logo/docbraces-logo.png","width":"476"},"logo":{"@type":"ImageObject","height":"60","url":"https://docbraces.com/files/common/Logo/_600x60_fit_center-center_82_none/docbraces-logo.png?mtime=1690497517","width":"408"},"name":"docbraces","sameAs":["https://twitter.com/docbraces","https://www.facebook.com/docbracesCanada/","https://www.instagram.com/docbraces/"],"telephone":"(888) 983-4032","url":"https://docbraces.com"},{"@id":"https://byhoffman.com/en/#creator","@type":"CreativeWork","alternateName":"Hoffman","description":"Let’s accelerate growth, encourage innovation and unleash your full potential—together.","image":{"@type":"ImageObject","height":"1000","url":"https://docbraces.com/files/common/Hoffman-Logo-Horizontal.png","width":"2218"},"inLanguage":"en","name":"Agence numérique Hoffman","url":"https://byhoffman.com/en"},{"@type":"BreadcrumbList","description":"Breadcrumbs list","itemListElement":[{"@type":"ListItem","item":"https://docbraces.com","name":"Home","position":1}],"name":"Breadcrumbs"}]}</script></code></pre> <p>I'm also seeing that SEOmatic is rendering your tracking scripts properly as well, both in the head, and in the <code><body></code> (unless you're doing that manually).</p> <p>I'd have to guess that something is malformed in your <code><head></code> of your HTML, that's the only time I've ever seen what you're describing occur.</p> <p>I do see some Twig comments rendering in your <code><head></code> so I feel like something is likely not right here. Try validating it with the WC3 validator:<a href="https://validator.w3.org/nu/?doc=https%3A%2F%2Fdocbraces.com%2F">https://validator.w3.org/nu/?doc=https%3A%2F%2Fdocbraces.com%2F</a></p> </div> </div> <div class="comment"> <div class="user"> <a rel="noreferrer nofollow" target="_blank" href="https://github.com/franck-thorck"><img src="https://avatars.githubusercontent.com/u/117709151?v=4" />franck-thorck</a> commented <strong> 2 months ago</strong> </div> <div class="markdown-body"> <p>Hi @khalwat,</p> <p>Thank you for quick reply.</p> <p>Yes the GTM was put in the code manually, because it was no more rendered by SEOMatic automatically when we filled it in the CMS.</p> <p>I am checking the head and DOM to see if something can stop the rendering.</p> <p>I let you know about that.</p> </div> </div> <div class="comment"> <div class="user"> <a rel="noreferrer nofollow" target="_blank" href="https://github.com/khalwat"><img src="https://avatars.githubusercontent.com/u/7570798?v=4" />khalwat</a> commented <strong> 2 months ago</strong> </div> <div class="markdown-body"> <p>It's very likely somehow a malformed <code><head></code> -- the only other thing I can think of is if you have some JavaScript that runs which is removing all of those items from the <code><head></code>.</p> </div> </div> <div class="comment"> <div class="user"> <a rel="noreferrer nofollow" target="_blank" href="https://github.com/khalwat"><img src="https://avatars.githubusercontent.com/u/7570798?v=4" />khalwat</a> commented <strong> 2 months ago</strong> </div> <div class="markdown-body"> <p>Will re-open if additional information is provided.</p> </div> </div> <div class="page-bar-simple"> </div> <div class="footer"> <ul class="body"> <li>© <script> document.write(new Date().getFullYear()) </script> Githubissues.</li> <li>Githubissues is a development platform for aggregating issues.</li> </ul> </div> <script src="https://cdn.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.min.js"></script> <script src="/githubissues/assets/js.js"></script> <script src="/githubissues/assets/markdown.js"></script> <script src="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.4.0/build/highlight.min.js"></script> <script src="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.4.0/build/languages/go.min.js"></script> <script> hljs.highlightAll(); </script> </body> </html>