Page 1 of 1

Got error during search after update to 3.2 version

Posted: Mon Jan 15, 2018 12:40 pm
by super.user
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.

Re: Got error during search after update to 3.2 version

Posted: Mon Jan 15, 2018 9:48 pm
by JoshyPHP

Re: Got error during search after update to 3.2 version

Posted: Tue Jan 16, 2018 7:23 am
by super.user
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

Re: Got error during search after update to 3.2 version

Posted: Tue Jan 16, 2018 7:39 am
by super.user
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 :)

Re: Got error during search after update to 3.2 version

Posted: Tue Jan 16, 2018 10:20 am
by super.user
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 =)

Re: Got error during search after update to 3.2 version

Posted: Wed Jan 17, 2018 2:47 pm
by JoshyPHP
Try removing your censored words, that could be related.

Re: Got error during search after update to 3.2 version

Posted: Wed Oct 03, 2018 6:52 am
by super.user
I've removed all censored words. And it does not help me.

Re: Got error during search after update to 3.2 version

Posted: Wed Oct 03, 2018 6:11 pm
by JoshyPHP
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.

Re: Got error during search after update to 3.2 version

Posted: Sat Oct 06, 2018 1:29 pm
by super.user
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.

Re: Got error during search after update to 3.2 version

Posted: Sat Oct 06, 2018 1:43 pm
by JoshyPHP
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.

Re: Got error during search after update to 3.2 version

Posted: Tue Oct 09, 2018 6:45 am
by super.user
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.

Re: Got error during search after update to 3.2 version

Posted: Tue Oct 09, 2018 10:03 am
by JoshyPHP
What was the censored word and replacement? They shouldn't be able to make the XML invalid.

Re: Got error during search after update to 3.2 version

Posted: Wed Oct 10, 2018 7:16 am
by super.user
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.

Re: Got error during search after update to 3.2 version

Posted: Wed Oct 10, 2018 4:48 pm
by JoshyPHP
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.

Re: Got error during search after update to 3.2 version

Posted: Thu Oct 11, 2018 11:18 am
by super.user
Thank you. I thinks we can mark this topic as solved.