MyBB Community Forums

Full Version: Embedded Tweets Hide Entire Post
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
https://universalgaming.net/showthread.p...7#pid19157

As seen here, since I updated my board software to 1.8.29 no embedded Tweets appear in posts, going so far as to hide the entire post contents. I checked the MyCode and it functions fine there so I don't know what's causing it. Here is the MyCode for reference:

<blockquote class="twitter-tweet" data-lang="en" style="text-shadow: none!important; max-width: 100%!important"><p lang="en" dir="ltr" style="text-shadow: none!important;"><a href="$1" style="text-shadow: none!important;"></a></blockquote>

<script async src="//platform.twitter.com/widgets.js" charset="utf-8"></script>

I don't think it's the software update itself because another board I go to isn't having this issue.
See this guide: https://docs.mybb.com/1.8/faq/errors/#pa...ion-failed

It is a known issue since 1.8.27 due to a security fix in the post parser. There should be some error log output that may help you identify what is causing it.
Hi,

I have the same problem since updated to 1.8.29...

@Matt : thank for you link, he advice to changing the $output_validation_policy value from VALIDATION_REQUIRE to VALIDATION_REPORT_ONLY in inc/class_parser.php, but that doesn't change anything: the contents of the tweets are still not displayed..

From ACP, in test's function of MyCode, it's okay... Sad


I enable Error Logs on my MyBB, and the error.log :

<error>
	<dateline>1642111464</dateline>
	<script>inc/class_parser.php</script>
	<line>2049</line>
	<type>512</type>
	<friendly_type>User Warning</friendly_type>
	<message>Parser output validation failed.
array (
  'sourceHtmlEntities' => '[twitter]https://twitter.com/x/status/xx[/twitter]',
  'outputHtmlEntities' => '&lt;blockquote class=&quot;twitter-tweet&quot; data-lang=&quot;en&quot; style=&quot;text-shadow: none!important; max-width: 100%!important&quot;&gt;&lt;p lang=&quot;en&quot; dir=&quot;ltr&quot; style=&quot;text-shadow: none!important;&quot;&gt;&lt;a href=&quot;https://xxx/redirect.php?url=https%3A%2F%2Ftwitter.com%2Fx%2Fstatus%2Fxx&quot; style=&quot;text-shadow: none!important;&quot;&gt;&lt;/a&gt;&lt;/blockquote&gt;
&lt;br /&gt;
&lt;script async src=&quot;//platform.twitter.com/widgets.js&quot; charset=&quot;utf-8&quot;&gt;&lt;/script&gt;',
  'errors' => 
  array (
    0 => 
    LibXMLError::__set_state(array(
       'level' => 3,
       'code' => 76,
       'column' => 356,
       'message' => 'Opening and ending tag mismatch: p line 1 and blockquote
',
       'file' => '',
       'line' => 1,
    )),
    1 => 
    LibXMLError::__set_state(array(
       'level' => 3,
       'code' => 41,
       'column' => 15,
       'message' => 'Specification mandates value for attribute async
',
       'file' => '',
       'line' => 3,
    )),
    2 => 
    LibXMLError::__set_state(array(
       'level' => 3,
       'code' => 65,
       'column' => 15,
       'message' => 'attributes construct error
',
       'file' => '',
       'line' => 3,
    )),
    3 => 
    LibXMLError::__set_state(array(
       'level' => 3,
       'code' => 73,
       'column' => 15,
       'message' => 'Couldn\'t find end of Start Tag script line 3
',
       'file' => '',
       'line' => 3,
    )),
    4 => 
    LibXMLError::__set_state(array(
       'level' => 3,
       'code' => 76,
       'column' => 80,
       'message' => 'Opening and ending tag mismatch: blockquote line 1 and script
',
       'file' => '',
       'line' => 3,
    )),
  ),
)</message>
	<back_trace>#0  errorHandler->error() called at [/inc/class_parser.php:2049]
#1  postParser->validate_output() called at [/inc/class_parser.php:1990]
#2  postParser->output_allowed() called at [/inc/class_parser.php:284]
#3  postParser->parse_message() called at [/inc/functions_post.php:817]
#4  build_postbit() called at [/newreply.php:684]
</back_trace>
</error>


But i'm not idead that why i have this errors...
Try using this for your MyCode Lozar. I switched to this and it fixed my issue:

<blockquote class="twitter-tweet" data-lang="en"><p lang="en" dir="ltr"></p><a href="$1"></a></blockquote>
<script async="" src="//platform.twitter.com/widgets.js" charset="utf-8"></script>
(2022-01-04, 09:13 PM)Moonface Wrote: [ -> ]https://universalgaming.net/showthread.p...7#pid19157

As seen here, since I updated my board software to 1.8.29 no embedded Tweets appear in posts, going so far as to hide the entire post contents. I checked the MyCode and it functions fine there so I don't know what's causing it. Here is the MyCode for reference:

<blockquote class="twitter-tweet" data-lang="en" style="text-shadow: none!important; max-width: 100%!important"><p lang="en" dir="ltr" style="text-shadow: none!important;"><a href="$1" style="text-shadow: none!important;"></a></blockquote>

<script async src="//platform.twitter.com/widgets.js" charset="utf-8"></script>

I don't think it's the software update itself because another board I go to isn't having this issue.

Hello,

I have same issue ; I tried to put the MyCode you mention. It's better as the entire post is not hidden anymore. But the tweet is not displayed, I only have an empty frame.
I tried to have a look at you board, it seems to be the same (or it's because I'm not registered?)

[attachment=44960]
A </p> is missing between </a> and </blockquote>
Yes. And the https in front of //platform.twitter.com

But I had already changed that, I thing this afternoon there was restrictions on the internet access I was using. Now everything is OK, thank you for your help.