skounis / mt-countdown

Display a custom block with a Countdown function for Announcements, such as time-limited offers or upcoming releases in a Drupal 8 website. Drupal 8 module
0 stars 1 forks source link

Injecting the component produces broken HTML and module conflicts with the metatag description #47

Closed vkechagias closed 5 years ago

vkechagias commented 5 years ago

The way we inject the HTML code in the the page seems to be wrong. The markup is placed within the <head> element and at the same time prevents the meta description to be properly rendered. It it overriding the description meta tag?

How to reproduce the Broken HTML:

  1. Make sure the inject option is enabled in the module configuration
  2. Select the view source option in your browser: https://www.screencast.com/t/CSIQFOCFVKsf
  3. Notice that the inject markup is added in the of the page and the head and body HTML elements are not opened/closed properly: https://www.screencast.com/t/JN2Ht3tnrdPW https://www.screencast.com/t/PIRkQZEu0

How to reproduce metatag description conflict:

  1. Install the metatag module
  2. Notice that the description metatag is not added correctly
  3. Disable the countdown module (Disabling the inject will not fix this)
  4. Notice that the description metatag is now added correctly: https://www.screencast.com/t/IFAuHttO4Cm
skounis commented 5 years ago

@EkaterynaVolkova Unfortunately your PR does not resolve the issue. I left a comment here

Please check

skounis commented 5 years ago

@EkaterynaVolkova We confirm that your latest commit fixes the conflict with the Metatags module.

We have noticed however a PHP error when we try to install the module. @vkechagias will come back to you with more details regarding this and provide more details in the issue that follows