Got error during search after update to 3.2 version

Get help developing custom BBCodes or request one.
Post Reply
super.user
Registered User
Posts: 50
Joined: Tue Feb 14, 2017 1:22 pm

Got error during search after update to 3.2 version

Post by super.user » Mon Jan 15, 2018 12:40 pm

Hello. I tried to upgrade my forum from 3.1 to 3.2.
And it seems like all is works fine. But On search I got following errors:

Code: Select all

phpBB Debug] PHP Warning: in file [ROOT]/vendor/s9e/text-formatter/src/Utils.php on line 76: DOMDocument::loadXML(): Specification mandate value for attribute Trash in Entity, line: 25
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/s9e/text-formatter/src/Utils.php on line 76: DOMDocument::loadXML(): attributes construct error in Entity, line: 25
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/s9e/text-formatter/src/Utils.php on line 76: DOMDocument::loadXML(): Couldn't find end of Start Tag URL line 25 in Entity, line: 25
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/s9e/text-formatter/src/Utils.php on line 76: DOMDocument::loadXML(): Opening and ending tag mismatch: IMG line 25 and URL in Entity, line: 25
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/s9e/text-formatter/src/Utils.php on line 76: DOMDocument::loadXML(): Opening and ending tag mismatch: r line 1 and IMG in Entity, line: 25
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/s9e/text-formatter/src/Utils.php on line 76: DOMDocument::loadXML(): Extra content at the end of the document in Entity, line: 25
[phpBB Debug] PHP Notice: in file [ROOT]/vendor/s9e/text-formatter/src/Utils.php on line 39: Trying to get property of non-object

I have already checked my customBB codes and it seems they are not the reason of problem.
Also I checked censored words.

What the reason of this it could also be?

Thank for replay.
For the 2d animated cartoons!!! and web. Of course web :D

User avatar
JoshyPHP
Code Contributor
Posts: 958
Joined: Mon Jul 11, 2011 12:28 am

Re: Got error during search after update to 3.2 version

Post by JoshyPHP » Mon Jan 15, 2018 9:48 pm

I wrote the thing that does BBCodes in 3.2.

super.user
Registered User
Posts: 50
Joined: Tue Feb 14, 2017 1:22 pm

Re: Got error during search after update to 3.2 version

Post by super.user » Tue Jan 16, 2018 7:23 am

Support Request Template
What version of phpBB are you using? phpBB 3.2.2
What is your board's URL? temporary it's local copy
Who do you host your board with? own server
How did you install your board? I used the download package from phpBB.com
What is the most recent action performed on your board? Update from a previous version of phpBB3
Is registration required to reproduce this issue? No
Do you have any MODs installed? No
Do you have any extensions installed? Yes
What version of phpBB3 did you update from? phpBB 3.1.10
What extensions do you have installed? Ban Hammer
TopicSolved
What styles do you currently have installed? Prosilver
What language(s) is your board currently using? British
Which database type/version are you using? MySQL 5
What is your level of experience? Comfortable with PHP and phpBB
What actions did you take (updating your board; installing a MOD, style or extension; etc.) prior to this problem becoming noticeable? I have updated my forum from 3.1 to 3.2.2 version according to this https://www.phpbb.com/support/docs/en/3 ... upgrade31/
That's all. I have disabled all extension and this bug reproduce in default style prosilver. I have updated this style as it was recomended.
Please describe your problem. After forum upgrading on search action I'm getting xmlParse errors.
I think the problem is in my database content. But this bug repdoce only on search. On viewtopic.php page the problem is absent.
Generated by SRT Generator
For the 2d animated cartoons!!! and web. Of course web :D

super.user
Registered User
Posts: 50
Joined: Tue Feb 14, 2017 1:22 pm

Re: Got error during search after update to 3.2 version

Post by super.user » Tue Jan 16, 2018 7:39 am

My bbCode:
[center]{TEXT}[/center] - <span class="text-center">{TEXT}</span>
[fimg={SIMPLETEXT1},{SIMPLETEXT2}]{URL}[/fimg] - <img src="{URL}" style="width: {SIMPLETEXT1}; height: {SIMPLETEXT2};" />
[font={INTTEXT}]{TEXT}[/font] - <span style="font-family: {INTTEXT};">{TEXT}</span>
[left]{TEXT}[/left] - <span class="text-left">{TEXT}</span>
[right]{TEXT}[/right]- <span class="text-right">{TEXT}</span>
[s]{TEXT}[/s] - <span class="bbcode-strikethrough">{TEXT}</span>
[sub]{TEXT}[/sub]- <sub>{TEXT}</sub>
[sup]{TEXT}[/sup] - <sup>{TEXT}</sup>
[vimeo]{IDENTIFIER}[/vimeo] - <div class="video-embed-wrapper"><div class="video-wrap"><iframe src="//player.vimeo.com/video/{IDENTIFIER}" data-vimeo-id="{IDENTIFIER}" width="560" height="315" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe></div></div>
[youtube]{IDENTIFIER}[/youtube] - <div class="video-embed-wrapper"><div class="video-wrap"><iframe width="560" height="315" src="https://www.youtube.com/embed/{IDENTIFIER}" data-youtube-id="{IDENTIFIER}" frameborder="0" allowfullscreen></iframe></div></div>

Thanks for replay :)
For the 2d animated cartoons!!! and web. Of course web :D

super.user
Registered User
Posts: 50
Joined: Tue Feb 14, 2017 1:22 pm

Re: Got error during search after update to 3.2 version

Post by super.user » Tue Jan 16, 2018 10:20 am

Also I have noticed new tages in posts. I think install script has added them.

Write following post as example:
<r>some text:<br/>
- click "Change"<br/>
- click "Change"<br/>

<URL url="https://localhost/phpbb3/imgs"><LINK_TEXT text="https:/localhost/imgspath.img">some url-</LINK_TEXT></URL><br/>
<br/>
Best regards.</r>

And here errors. URL and LINK_TEXT tages are in line 11 :

Code: Select all

phpBB Debug] PHP Warning: in file [ROOT]/vendor/s9e/text-formatter/src/Utils.php on line 77: DOMDocument::loadXML(): Specification mandate value for attribute Trash in Entity, line: 11
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/s9e/text-formatter/src/Utils.php on line 77: DOMDocument::loadXML(): attributes construct error in Entity, line: 11
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/s9e/text-formatter/src/Utils.php on line 77: DOMDocument::loadXML(): Couldn't find end of Start Tag URL line 11 in Entity, line: 11
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/s9e/text-formatter/src/Utils.php on line 77: DOMDocument::loadXML(): Opening and ending tag mismatch: r line 1 and URL in Entity, line: 11
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/s9e/text-formatter/src/Utils.php on line 77: DOMDocument::loadXML(): Extra content at the end of the document in Entity, line: 11
[phpBB Debug] PHP Notice: in file [ROOT]/vendor/s9e/text-formatter/src/Utils.php on line 39: Trying to get property of non-object
When I change URL tag in this way
<URL>some url</URL>
The error is gone.
But I made it manualy in my database.

I noticed that /bin/phpbbcli.php db:migrate --safe-mode script change [url=someurl] to <URL src=someurl>someurl</URL>



Also I'm using phpbb Native Fulltext search backend.

I hope all this information will help us find solution of this problem =)
For the 2d animated cartoons!!! and web. Of course web :D

User avatar
JoshyPHP
Code Contributor
Posts: 958
Joined: Mon Jul 11, 2011 12:28 am

Re: Got error during search after update to 3.2 version

Post by JoshyPHP » Wed Jan 17, 2018 2:47 pm

Try removing your censored words, that could be related.
I wrote the thing that does BBCodes in 3.2.

super.user
Registered User
Posts: 50
Joined: Tue Feb 14, 2017 1:22 pm

Re: Got error during search after update to 3.2 version

Post by super.user » Wed Oct 03, 2018 6:52 am

I've removed all censored words. And it does not help me.
For the 2d animated cartoons!!! and web. Of course web :D

User avatar
JoshyPHP
Code Contributor
Posts: 958
Joined: Mon Jul 11, 2011 12:28 am

Re: Got error during search after update to 3.2 version

Post by JoshyPHP » Wed Oct 03, 2018 6:11 pm

Something causes the XML for the post to be malformed. It could be due to a bug, an extension or some SQL query you've run manually.
I wrote the thing that does BBCodes in 3.2.

super.user
Registered User
Posts: 50
Joined: Tue Feb 14, 2017 1:22 pm

Re: Got error during search after update to 3.2 version

Post by super.user » Sat Oct 06, 2018 1:29 pm

JoshyPHP wrote:
Wed Oct 03, 2018 6:11 pm
Something causes the XML for the post to be malformed. It could be due to a bug, an extension or some SQL query you've run manually.
I've removed all extensions and styles, all cencored words and custom bbcodes. So it should be some another reason.
For the 2d animated cartoons!!! and web. Of course web :D

User avatar
JoshyPHP
Code Contributor
Posts: 958
Joined: Mon Jul 11, 2011 12:28 am

Re: Got error during search after update to 3.2 version

Post by JoshyPHP » Sat Oct 06, 2018 1:43 pm

You're going to have to find what XML causes this error message:

Code: Select all

DOMDocument::loadXML(): Specification mandate value for attribute Trash in Entity, line: 25
I don't know whether something creates/created an attribute named Trash or if the word "Trash" is used as a placeholder for an invalid attribute name in LibXML. The former seems more likely. Either way, you're going to have to find out what causes this XML to be. That includes past extensions too.

It is very unlikely to be related to custom BBCodes.
I wrote the thing that does BBCodes in 3.2.

super.user
Registered User
Posts: 50
Joined: Tue Feb 14, 2017 1:22 pm

Re: Got error during search after update to 3.2 version

Post by super.user » Tue Oct 09, 2018 6:45 am

Hello. Thanks for your reply.
I've found the reason.
Actually that was censored words. I forgot to clear cache after their removing. :cry:

Thanks.
For the 2d animated cartoons!!! and web. Of course web :D

User avatar
JoshyPHP
Code Contributor
Posts: 958
Joined: Mon Jul 11, 2011 12:28 am

Re: Got error during search after update to 3.2 version

Post by JoshyPHP » Tue Oct 09, 2018 10:03 am

What was the censored word and replacement? They shouldn't be able to make the XML invalid.
I wrote the thing that does BBCodes in 3.2.

super.user
Registered User
Posts: 50
Joined: Tue Feb 14, 2017 1:22 pm

Re: Got error during search after update to 3.2 version

Post by super.user » Wed Oct 10, 2018 7:16 am

JoshyPHP wrote:
Tue Oct 09, 2018 10:03 am
What was the censored word and replacement? They shouldn't be able to make the XML invalid.
It was the URL= word. And this word was replaced with the Trash post... spyware/trojan ... string.
Some of the posts contain the following string <URL url="some_url">some_url</URL>.
And after the replacement, there was the following result <URL Trash post... without > symbol

The replacement erased closing > symbol.

Thanks for reply.
For the 2d animated cartoons!!! and web. Of course web :D

User avatar
JoshyPHP
Code Contributor
Posts: 958
Joined: Mon Jul 11, 2011 12:28 am

Re: Got error during search after update to 3.2 version

Post by JoshyPHP » Wed Oct 10, 2018 4:48 pm

For future reference, I tracked it down to censor_text(), which isn't totally HTML- or XML-safe. The simplest workaround would be to avoid censoring things that resembles markup.
I wrote the thing that does BBCodes in 3.2.

super.user
Registered User
Posts: 50
Joined: Tue Feb 14, 2017 1:22 pm

Re: Got error during search after update to 3.2 version

Post by super.user » Thu Oct 11, 2018 11:18 am

Thank you. I thinks we can mark this topic as solved.
For the 2d animated cartoons!!! and web. Of course web :D

Post Reply

Return to “Custom BBCode Development and Requests”

Who is online

Users browsing this forum: No registered users and 8 guests