News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Attempted Theme Change caused Fatal Error on new install

Started by Vexthem, August 02, 2022, 12:03:38 AM

Previous topic - Next topic

Vexthem

Hi,

I was just about done setting up my new 2.1.2 forum (and had not backed it up yet) when I uploaded four 2.1 Themes (at least according to the filter): serv2, SociWT, GanderGreen2.1.2a, and Blue_Space2.1.2a.  The uploads all seemed to go fine.  Server permissions were probably 555 at the time, if that matters, but the files are on the server, and permission are now back to 755.

I got the following (partially redacted) error message when I try to change to a new theme or back to the default / SMF Default Theme - Curve2.  Page back works, but any new page results in the same error.

Fatal error: Uncaught Error: Non-static method HUU\Bese::yukle() cannot be called statically in
/homepages/33/dxxxxxxxxx/htdocs/myurl.com/HTML/HJJKin/Themes/serv2/tema/huu.php:7 Stack trace: #0
/homepages/33/dxxxxxxxxx/htdocs/myurl.com/HTML/HJJKin/Themes/serv2/index.template.php(76): require_once() #1
/homepages/33/dxxxxxxxxx/htdocs/myurl.com/HTML/HJJKin/Sources/Load.php(2747): template_init() #2
/homepages/33/dxxxxxxxxx/htdocs/myurl.com/HTML/HJJKin/Sources/Load.php(2453): loadSubTemplate('init', 'ignore') #3
/homepages/33/dxxxxxxxxx/htdocs/myurl.com/HTML/HJJKin/index.php(234): loadTheme() #4
/homepages/33/dxxxxxxxxx/htdocs/myurl.com/HTML/HJJKin/index.php(191): smf_main() #5 {main} thrown in
/homepages/33/dxxxxxxxxx/htdocs/myurl.com/HTML/HJJKin/Themes/serv2/tema/huu.php on line 7

I am hoping to not have to start my forum setup over.  Thanks in advance.

More info: MySQL 5.7, PHP 8.0

Vexthem

I just noticed the functionality of the Theme Version "toggle list".  Two of the Themes I downloaded (Serv2 and SociWT) are not listed as 2.1.2.  I believe I tried using Serv2 first, causing the error to crash the forum.

I am starting to wonder if I can just reinstall the forum without losing much, if any, progress on getting the forum setup.  Or if deleting or replacing several files on the server from the Install Zip is likely to be just as good. 

There are no posts in the forum, not that I think that matters, if I'm understanding enough here.  I added Boards, User Groups, set permissions, stuff like that.

Arantor

The issue is that the huu.PHP file in Serv2 isn't written properly. It's not a PHP version thing, not an SMF version thing, it's just a theme with a bug that the author should fix.

In said file you should see a line that begins "public function yukle", try changing it to "public static function yukle".

Kindred

Also, you should be able to switch back to the default theme by adding ?theme=1 to the url (after index.php)
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Vexthem

Awesome, thanks.

Yes {forum URL}?theme=1, did in fact get thing right again.

Vexthem

Wow, I ran a number of maintenance tasks, changed security settings, and then after about 10 tasks and changes all of a sudden the HUU.php / Serv2 Theme error popped back up. The ...?theme=1 "trick" worked again, of course, and I went in and deleted Serv2 and the other non 2.1.2 theme, to hopefully keep this from happening again.

I had not changed any Theme settings after the initial ...?theme=1.  I had assumed that that command would prevent the offending Theme from causing further issue unless selected again.

Arantor


Vexthem

I went into Admin / Configuration / Theme Settings and "X" deleted the two suspect / problematic Themes.

I have not yet double checked on my server to see if that deleted the actual files, but if it did not, then I will do that too.

Arantor

That will delete the entry from the database, the files will remain - the reason I asked is that people sometimes just delete the files without telling SMF they did that.

Illori

I believe in SMF 2.1 it can delete the theme files where in 2.0 it does not.

Kindred

the theme=1 trick resets YOUR personal theme to the default....  but it may not be permanent.

What it does is allow you to GET to and CORRECT settings which may have broken things in a different theme
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Arantor

Quote from: Kindred on August 02, 2022, 04:33:08 PMthe theme=1 trick resets YOUR personal theme to the default....  but it may not be permanent.

The change in URL resets it for the duration of your session.

Sir Osis of Liver

Doesn't work if members are not allowed to select their own theme.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Arantor

Admins are always expressly allowed to do so, though. The OP was logged in at the time.

Sir Osis of Liver

Quote from: Illori on August 02, 2022, 03:56:41 PMI believe in SMF 2.1 it can delete the theme files where in 2.0 it does not.

Yes, does that by default without asking.

Quote from: Arantor on August 02, 2022, 06:28:43 PMAdmins are always expressly allowed to do so, though. The OP was logged in at the time.

Odd thing just happened in 2.1.2 test install, changed theme in Manage and Install and reset everyone, clicked Save, theme didn't change for admin until logged out.  Have seen this occasionally in 2.0, can't replicate it, seems to be random.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Advertisement: