PHPBB3-13803 / PHPBB3-13891 - Reparsing text

Discuss requests for comments/changes posted in the Issue Tracker for the development of phpBB. Current releases are 3.2/Rhea and 3.3/Proteus.
Post Reply
Cin
Registered User
Posts: 20
Joined: Mon Mar 23, 2015 11:33 am

Re: PHPBB3-13803 / PHPBB3-13891 - Reparsing text

Post by Cin »

Yeah that's what I thought, I'll run it later again to see what's the difference. It's a VPS I use for testing, while reparsing the I/O wait is about 47% so I think that's the issue.

Edit: the reparsing just failed on me, I have no idea why. It just stopped reparsing. I'll try it again and see what happens.
Last edited by Cin on Sun Jul 05, 2015 12:41 pm, edited 2 times in total.

User avatar
JoshyPHP
Registered User
Posts: 381
Joined: Fri Jul 08, 2011 9:43 pm

Re: PHPBB3-13803 / PHPBB3-13891 - Reparsing text

Post by JoshyPHP »

Try removing the memory limit, see how that works out for you. I tested it on PHP 7.0.0-alpha2 for what it's worth.

Cin
Registered User
Posts: 20
Joined: Mon Mar 23, 2015 11:33 am

Re: PHPBB3-13803 / PHPBB3-13891 - Reparsing text

Post by Cin »

Okay, It went very fast until it reached the first unparsed post, and then it slows down again but now it only takes 18 min :)

During the first reparsing I also got some errors:

PHP Warning: file_get_contents(): php_network_getaddresses: getaddrinfo failed: Name or service not known in .../vendor/s9e/text-formatter/src/Plugins/MediaEmbed/Parser.php on line 316

PHP Warning: file_get_contents(compress.zlib://http://.tumblr.com/post//embed): failed to open stream: operation failed in .../vendor/s9e/text-formatter/src/Plugins/MediaEmbed/Parser.php on line 316


It tries to get files (attachments?) from an external link? I think they don't exist anymore and thats why the reparser gives an error?

I'm also on 7.0.0-alpha2 (nightly build 04.07)

Other than that it reparses fine btw.

User avatar
JoshyPHP
Registered User
Posts: 381
Joined: Fri Jul 08, 2011 9:43 pm

Re: PHPBB3-13803 / PHPBB3-13891 - Reparsing text

Post by JoshyPHP »

Cin wrote: Okay, It went very fast until it reached the first unparsed post, and then it slows down again (removing the memory limit doesn't seem to do anything)
Then your database is the bottleneck. If it's just a test server you should try switching all of your tables to MyISAM.
Cin wrote: It tries to get files (attachments?) from an external link? I think they don't exist anymore and thats why the reparser gives an error?
I think you have installed my s9e/mediaembed extension and it's trying to embed a Tumblr post. If you could narrow down which post generates that error and get me the URL, I'd love to run some tests here.

Here's how you can try to reparse a smaller block of posts:

Code: Select all

./bin/phpbbcli.php reparser:reparse post_text \
	--range-min  123 \
	--range-max  456 \
	--range-size 10

Cin
Registered User
Posts: 20
Joined: Mon Mar 23, 2015 11:33 am

Re: PHPBB3-13803 / PHPBB3-13891 - Reparsing text

Post by Cin »

Yes I have that extension installed.

Here's the content of one of those posts:

Code: Select all

<r><URL url="http://sports-livez.tumblr.com/1">http://sports-livez.tumblr.com/1</URL></r>

User avatar
JoshyPHP
Registered User
Posts: 381
Joined: Fri Jul 08, 2011 9:43 pm

Re: PHPBB3-13803 / PHPBB3-13891 - Reparsing text

Post by JoshyPHP »

I can confirm that it fails on my board too. It's related to the extension, I will look into it asap.

What you can do is update your local version of s9e\TextFormatter by running this in your phpBB directory:

Code: Select all

../composer.phar up s9e/text-formatter
./bin/phpbbcli.php cache:purge
This will fix this particular error.

Nicofuma
3.2 Release Manager
3.2 Release Manager
Posts: 299
Joined: Sun Apr 13, 2014 1:40 am
Location: Paris

Re: PHPBB3-13803 / PHPBB3-13891 - Reparsing text

Post by Nicofuma »

For area51 it took ~20 minutes (it was do be live). But what you have to know is that it doesn't really matter if it takes 5h because you don't need to disable the board. (There is a small window where you could have a conflict but it's rather small, one or 2 seconds)
Member of the phpBB Development-Team
No Support via PM

Cin
Registered User
Posts: 20
Joined: Mon Mar 23, 2015 11:33 am

Re: PHPBB3-13803 / PHPBB3-13891 - Reparsing text

Post by Cin »

JoshyPHP wrote: I can confirm that it fails on my board too. It's related to the extension, I will look into it asap.

What you can do is update your local version of s9e\TextFormatter by running this in your phpBB directory:

Code: Select all

../composer.phar up s9e/text-formatter
./bin/phpbbcli.php cache:purge
This will fix this particular error.
Yep that fixed it the tumblr problem, however, I reparsed again and got one error, the contents of the post display a few imgur links:

Code: Select all

<r>(<IMGUR id="a/WCowg" url="http://imgur.com/a/WCowg%29">http://imgur.com/a/WCowg)</IMGUR><br/>
Jammer dat ik de rest niet heb gezien.<br/>
  <E>)-B</E> <br/>
Ik weet heel duidelijk wat ik hier allemaal zou aanvinken <E>:bat:</E><br/>
<br/>
<IMG src="http://i.imgur.com/U7GIZTF.jpg"><s>[img]</s><URL url="http://i.imgur.com/U7GIZTF.jpg">http://i.imgur.com/U7GIZTF.jpg</URL><e>[/img]</e></IMG><br/>
<br/>
<IMG src="http://i.imgur.com/LBGBWzA.jpg"><s>[img]</s><URL url="http://i.imgur.com/LBGBWzA.jpg">http://i.imgur.com/LBGBWzA.jpg</URL><e>[/img]</e></IMG></r>
I don't know if you read in my previous post but I also get the following error when starting the reparser. Not a big problem because it doesn't seem to impact the reparser:
PHP Warning: str_repeat(): Second argument has to be greater than or equal to 0 in.../public_html/phpbb/path_helper.php on line 232

User avatar
JoshyPHP
Registered User
Posts: 381
Joined: Fri Jul 08, 2011 9:43 pm

Re: PHPBB3-13803 / PHPBB3-13891 - Reparsing text

Post by JoshyPHP »

Cin wrote: Yep that fixed it the tumblr problem, however, I reparsed again and got one error, the contents of the post display a few imgur links:
What's wrong with that post? Is that the Imgur gallery? That's one of the sites that's automatically embedded by the extension. You'd need to put the link in [url] tags if you want it to remain as a link.
Cin wrote: I don't know if you read in my previous post but I also get the following error when starting the reparser. Not a big problem because it doesn't seem to impact the reparser:
Yeah, I got that error too. It's relatively recent and unrelated. It's only on PHP7 too.

Cin
Registered User
Posts: 20
Joined: Mon Mar 23, 2015 11:33 am

Re: PHPBB3-13803 / PHPBB3-13891 - Reparsing text

Post by Cin »

JoshyPHP wrote: What's wrong with that post? Is that the Imgur gallery? That's one of the sites that's automatically embedded by the extension. You'd need to put the link in [url] tags if you want it to remain as a link.
Sorry, I forgot to add the warning:

Code: Select all

 PHP Warning:  file_get_contents(): HTTP request failed! HTTP/1.1 404 Not Found
 in .../public_html/vendor/s9e/text-formatter/src/Plugins/MediaEmbed/Parser.php on line 316
I don't know if anything is wrong with the post, I'm just letting you know so if its a conflict from mediaembed you can fix it.

Post Reply