Conflict JS minify with schema.org markup
-
Some other plugins print out schema.org markup and Html minifier have some troubles with json+ld markup. I’ve here the error log message what happened when markup is echoed.
2023/10/17 09:32:02 [error] 1592382#1592382: *41684479 FastCGI sent in stderr: “PHP message: PHP Fatal error: Uncaught JSMin_UnterminatedStringException: JSMin: Unterminated String at byte 1368: [Here is json+ld text content] in /var/www/blog/wp-content/plugins/wp-super-minify/includes/min/lib/JSMin.php:209
Stack trace: 0 /var/www/blog/wp-content/plugins/wp-super-minify/includes/min/lib/JSMin.php(150): JSMin->action() 1 /var/www/blog/wp-content/plugins/wp-super-minify/includes/min/lib/JSMin.php(84): JSMin->min() 2 /var/www/blog/wp-content/plugins/wp-super-minify/includes/min/lib/Minify/HTML.php(236): JSMin::minify() 3 [internal function]: Minify_HTML->_removeScriptCB() 4 /var/www/blog/wp-content/plugins/wp-super-minify/includes/min/lib/Minify/HTML.php(103): preg_replace_callback() 5 /var/www/blog/wp-content/plugins/wp-super-minify/includes/min/lib/Minify/HTML.php(45): Minify_HTML->p” while reading response header from upstream, client:
The content its like:
<script type=”application/ld+json“>{ “@context”: “https://schema.org”, “@type”: “FAQPage”, “mainEntity”: [{ “@type”: “Question”, “name”: “Question 1?”, “acceptedAnswer”: { “@type”: “Answer”, “text”: “Answer 1” } },{ “@type”: “Question”, “name”: “Question 2?”, “acceptedAnswer”: { “@type”: “Answer”, “text”: “Answer 2” } },{ “@type”: “Question”, “name”: “Question 3?”, “acceptedAnswer”: { “@type”: “Answer”, “text”: “Answer 3” } }] }</script>
- The topic ‘Conflict JS minify with schema.org markup’ is closed to new replies.