DOMElement error

Get help with installation and running phpBB 3.2.x here. Please do not post bug reports, feature requests, or extension related questions here.
Aeroprism
Registered User
Posts: 11
Joined: Mon Jun 17, 2019 3:36 pm

DOMElement error

Post by Aeroprism » Mon Jun 17, 2019 3:42 pm

Good day dear people of PHPBB. I have been administrating PHPBB boards for a few years now and so far, I was always able to get by on my own but this error here really confuses me. It looks like something that will be easily fixed, providing I am given a nudge in the proper direction.

I was trying to figure out why quoted posts didn't work correctly on my board and I figured it was a theme issue. As I was going to revert to the default theme, I noticed that an old theme I tried in the past was still there but unused at all. I uninstalled it through the console and following that, this is what happened:

Fatal error: Uncaught TypeError: Argument 1 passed to s9e\TextFormatter\Configurator\TemplateNormalizations\AbstractNormalization::normalize() must be an instance of DOMElement, null given, called in /home/[Name of my server goes here]/vendor/s9e/text-formatter/src/Configurator.php on line 7177 and defined in /home/[Name of my server goes here]/vendor/s9e/text-formatter/src/Configurator.php:3987 Stack trace: #0 /home/[Name of my server goes here]/vendor/s9e/text-formatter/src/Configurator.php(7177): s9e\TextFormatter\Configurator\TemplateNormalizations\AbstractNormalization->normalize(NULL) #1 /home/[Name of my server goes here]/phpbb/textformatter/s9e/factory.php(539): s9e\TextFormatter\Configurator\TemplateNormalizer->normalizeTemplate('<blockquote><xs...') #2 /home/[Name of my server goes here]/phpbb/textformatter/s9e/factory.php(280): phpbb\textformatter\s9e\factory->get_default_bbcodes(Object(s9e\TextFormatter\Configurator)) #3 /home/[Name of my server goes here]/phpbb/ in /home/[Name of my server goes here]/vendor/s9e/text-formatter/src/Configurator.php on line 3987

Is there anyone with experience with this who could point me in the right direction?

Thank you.

User avatar
stevemaury
Support Team Member
Support Team Member
Posts: 50499
Joined: Thu Nov 02, 2006 12:21 am
Location: The U.P.
Name: Steve
Contact:

Re: DOMElement error

Post by stevemaury » Mon Jun 17, 2019 9:51 pm

Please fill out the Support Request Template and post it back here to enable us to assist you better.
For REALLY good and VERY inexpensive hosting CLICK HERE

I can stop all your spam. I can upgrade or update your Board. PM or email me. (Paid support)

Aeroprism
Registered User
Posts: 11
Joined: Mon Jun 17, 2019 3:36 pm

Re: DOMElement error

Post by Aeroprism » Tue Jun 18, 2019 12:08 am

Gladly! Thank you.

I only have three accounts on my board: the main admin which we do not use, my account and my colleague's account. We use this board as a private dev/discussion tool because we like how forum handle topics. It's a very small, private forum with not that much on it but it would be great to be able to recover it.

Support Request Template
What version of phpBB are you using? phpBB 3.2.7
What is your board's URL? http://nekoprism.com/theforumofishtalis
Who do you host your board with? Lunarpages.com
How did you install your board? I used a tool provided by my host
What is the most recent action performed on your board? Please select your answer
Is registration required to reproduce this issue? Yes
Do you have any MODs installed? No
Do you have any extensions installed? No
What styles do you currently have installed? HexagonReborn
What language(s) is your board currently using? English
Which database type/version are you using? MySQL 5
What is your level of experience? Comfortable with PHP and phpBB
What username can be used to view this issue? No answer given
What password can be used to view this issue? No answer given
What actions did you take (updating your board; installing a MOD, style or extension; etc.) prior to this problem becoming noticeable? I was testing something to isolate an error I got when I tried to quote a post, I suspected the error was caused by THEME:HexagonReborn. Going through the ACP, I noticed a style that was no longer used so I removed it. (I'm sorry I forgot the name...). After that, I set the forum control panel to apply the default style to all users. From there, I got the message I placed in my original post.
Please describe your problem. The error message is permanent as soon as I try to log in. If I clear browser history and come to the URL unlogged, the interface loads just fine.
Generated by SRT Generator

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

Re: DOMElement error

Post by JoshyPHP » Tue Jun 18, 2019 5:48 am

Aeroprism wrote:
Mon Jun 17, 2019 3:42 pm
Is there anyone with experience with this who could point me in the right direction?
Probably the same thing as this and that.

Try upgrading or recompiling PHP, libxml2, something like that. My guess is there's a busted binary for either one of them in a popular distro.
I wrote the thing that does BBCodes in 3.2.

Aeroprism
Registered User
Posts: 11
Joined: Mon Jun 17, 2019 3:36 pm

Re: DOMElement error

Post by Aeroprism » Tue Jun 18, 2019 11:44 am

That's unfortunately outside my range: those are directly managed by my host and though I could ask them to do it for me, I would have to pay them a lot of money for a tentative solution.

I don't know MUCH about PHP but I have been an IT support for 20+ years and my gut feeling tells me that this is something that's going to be very simple to fix once we understand what's happening.

User avatar
thecoalman
Community Team Member
Community Team Member
Posts: 3222
Joined: Wed Dec 22, 2004 3:52 am
Location: Pennsylvania, U.S.A.
Contact:

Re: DOMElement error

Post by thecoalman » Tue Jun 18, 2019 11:59 am

You can test it by running the script posted by JoshyPHP he already linked to.

viewtopic.php?p=14987796#p14987796

Just paste it into new file and save as test.php, upload to your server and point your browser at it and then delete it.
Aeroprism wrote:
Tue Jun 18, 2019 11:44 am
I would have to pay them a lot of money for a tentative solution.
If the script fails to produce the correct result it will likely be unresovable by yourself. Generally speaking issues like this would be the responsibility of the host. You can always link to this topic so they understand what the issue may be.

Aeroprism
Registered User
Posts: 11
Joined: Mon Jun 17, 2019 3:36 pm

Re: DOMElement error

Post by Aeroprism » Tue Jun 18, 2019 1:59 pm

Ok, tried it. Here is the output:

Parse error: syntax error, unexpected 'version' (T_STRING) in /home/nekop3/public_html/theforumofishtalis/test.php on line 3


It does look like a PHP version issue but, it was working fine yesterday and as far as I know, Lunarpages did nothing to their current PHP setup, they usually warn us weeks in advance when they do.

On a side note: every other PHP-dependent ressource on my server works absolutely fine. the problem IS within the forum's code.

On yet another side note: I have installed a fresh new PHPBB, works fine. Perhaps I could just circumvent the issue by exporting my current data and placing it to the new one? Is there a guide written for this?

User avatar
stevemaury
Support Team Member
Support Team Member
Posts: 50499
Joined: Thu Nov 02, 2006 12:21 am
Location: The U.P.
Name: Steve
Contact:

Re: DOMElement error

Post by stevemaury » Tue Jun 18, 2019 4:35 pm

Just make the config.php file of the new installation point to your prior database.
For REALLY good and VERY inexpensive hosting CLICK HERE

I can stop all your spam. I can upgrade or update your Board. PM or email me. (Paid support)

Aeroprism
Registered User
Posts: 11
Joined: Mon Jun 17, 2019 3:36 pm

Re: DOMElement error

Post by Aeroprism » Tue Jun 18, 2019 11:37 pm

stevemaury wrote:
Tue Jun 18, 2019 4:35 pm
Just make the config.php file of the new installation point to your prior database.
Thank you stevemaury, this makes a lot of sense!

I compared my old config file with the one generated by the new forum installed and in the new, I commented the lines that were different so I would not lose them and replaced them with the old, namely:

Code: Select all

$dbname = 'nekop3_phpb842';
$dbuser = 'dbusername';
$dbpasswd = 'dbpassword';
$table_prefix = 'phpbbd2_';
But SQL does pay hard to get tonight:

SQL ERROR [ mysqli ]

Table 'nekop3_phpb842.phpbbuh_config' doesn't exist [1146]

Any further suggestions? I'm pretty optimistic that we're close to a success!
Last edited by thecoalman on Wed Jun 19, 2019 12:39 am, edited 2 times in total.
Reason: Removed username and password, please be careful about posting information like that here or elsewhere.

User avatar
Lumpy Burgertushie
Registered User
Posts: 66326
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: DOMElement error

Post by Lumpy Burgertushie » Wed Jun 19, 2019 12:29 am

first thing is to change the database password since you have now posted it in public.

then, make sure the old database is where you are pointing the config.php file.
make sure the database name, server name, username and now new password is all correct.
the error is telling you that the set of tables are you asking for do not exist at the place you are asking for them.

something is wrong with the info you are putting in the config.php file.


robert
I'm baaaaaccckkkk. still doing work on donation basis. PM your needs.

Premium phpBB 3.2 Styles by PlanetStyles.net

If a tree falls in the forest and nobody is there, does it make a sound?

User avatar
thecoalman
Community Team Member
Community Team Member
Posts: 3222
Joined: Wed Dec 22, 2004 3:52 am
Location: Pennsylvania, U.S.A.
Contact:

Re: DOMElement error

Post by thecoalman » Wed Jun 19, 2019 12:35 am

I hate to suggest this becsue it's like the have you powered it on on and off suggestion but have you tried manually clearing the cache? Delete every file/folder but the .htaccess and index.htm one.
Aeroprism wrote:
Tue Jun 18, 2019 11:37 pm
Table 'nekop3_phpb842.phpbbuh_config' doesn't exist [1146]

Any further suggestions? I'm pretty optimistic that we're close to a success!
The table prefix indicated in the code you posted is $table_prefix = 'phpbbd2_';. If that is in the config file I'm not sure where phpbbuh_c would coimng from. The table prefix needs to be whatever was in the original file.

Aeroprism
Registered User
Posts: 11
Joined: Mon Jun 17, 2019 3:36 pm

Re: DOMElement error

Post by Aeroprism » Wed Jun 19, 2019 1:36 am

Lumpy Burgertushie wrote:
Wed Jun 19, 2019 12:29 am
first thing is to change the database password since you have now posted it in public.
Oh come on, I'm not THAT green ;-) what I posted there was gibberish

I will study your suggestion and thecoalman's as well. I'm really not freaking out because there wasn't THAT much on there and after.... 10 years of having absolutely no issues with PHPBB, this actually is a GREAT learning experience!

So thank you, all of you! And keep that awesome advice coming!

Edit: Thinking that perhaps I did something wrong, I tried again from scratch. Since my "real" forum is fudged, I backed it up and uninstalled it properly. Then I re-created it with the EXACT SAME parameters. The only difference is the DB name because it's auto-generated, so I did what you did with my config.php using the config.php from my backed up forum.

<?php
// phpBB 3.2.x auto-generated configuration file
// Do not change anything in this file!
$dbms = 'phpbb\\db\\driver\\mysqli';
$dbhost = 'localhost';
$dbport = '';
$dbname = 'dbusername_phpb842';
$dbuser = 'dbusername_phpb842';
$dbpasswd = 'db_pass';
$table_prefix = 'phpbbd2_';
$phpbb_adm_relative_path = 'adm/';
$acm_type = 'phpbb\\cache\\driver\\file';

@define('PHPBB_INSTALLED', true);
// @define('PHPBB_DISPLAY_LOAD_TIME', true);
@define('PHPBB_ENVIRONMENT', 'production');
// @define('DEBUG_CONTAINER', true);

And upon loading my forum, it insists on the prefix that was there BEFORE I changed my config.php, just like that post I did before,

Is there another place where this db prefix might be referenced?

User avatar
canonknipser
Registered User
Posts: 1995
Joined: Thu Sep 08, 2011 4:16 am
Location: Germany
Name: Frank Jakobs
Contact:

Re: DOMElement error

Post by canonknipser » Wed Jun 19, 2019 4:00 pm

Aeroprism wrote:
Wed Jun 19, 2019 1:36 am
Is there another place where this db prefix might be referenced?
maybe someone modified includes/constants.php? For every table from the core there is an entry like

Code: Select all

define('CONFIG_TABLE',				$table_prefix . 'config');
using the $table_prefix from config.php. If some changed that file ....
Greetings, Frank
phpbb.de support team member
English is not my native language - no support via PM or mail
New arrival - Extensions and scripts for phpBB

Aeroprism
Registered User
Posts: 11
Joined: Mon Jun 17, 2019 3:36 pm

Re: DOMElement error

Post by Aeroprism » Wed Jun 19, 2019 4:11 pm

I checked the constants.php, all seems A-ok there.

Since I couldn't convince the PHP config to look for the proper DB prefix, I went the other way around and changed the prefix of the DB to accomodate the config.

And so, happily, my forum reads my DB again.

And we are back to the original DOMElement error.

So, is it safe to conclude that the error is within my DB?

User avatar
thecoalman
Community Team Member
Community Team Member
Posts: 3222
Joined: Wed Dec 22, 2004 3:52 am
Location: Pennsylvania, U.S.A.
Contact:

Re: DOMElement error

Post by thecoalman » Thu Jun 20, 2019 9:37 am

Aeroprism wrote:
Wed Jun 19, 2019 4:11 pm
So, is it safe to conclude that the error is within my DB?
It is safe to conclude that the information posted by Joshy in this topic and the topics he linked to are authoritative since he wrote the script you are having an issue with. The standalone test script failed, yes? If it's not working there it's not going to work within phpBB.

Post Reply

Return to “[3.2.x] Support Forum”