My-Little-Forum / mylittleforum

A simple PHP and MySQL based internet forum that displays the messages in classical threaded view (tree structure)
GNU General Public License v3.0
118 stars 47 forks source link

Theme Not Loading #684

Closed cankaygisiz closed 6 months ago

cankaygisiz commented 6 months ago

I have successfully run the whole thing but without the default theme. For some reason, my whole web page is just plain html text without CSS formatting. Besides this problem, formatting buttons in text area (Creating New Thread) doesn't work. I liked the whole idea and the work. I would really like to fix my problems and work on it on my future projects. Hope you have a good day. Let me know if there is something I can do to fix this issue.

auge8472 commented 6 months ago

I assume you to be the author of the forum entry, that describes the same situation. Am I right about this?

In my answer to the post in the forum thread I assumed, that the cause is a missing trailing slash in the setting forum_address. This would lead to broken URLs in the HTML sources for images, the stylesheet file and JS files and would explain this behaviour.

Please go to the settings page in the admin area and open the link to the advanced settings at the end of the settings form. There search for the setting forum_address (the settings keys are alphabetically ordered) and check, if the value for the forum address ends with a slash.

As examples: If you run your forum in a folder of your website:

/* change from */
example.net/forum
/* to */
example.net/forum/

or, if you run the forum on a subdomain

/* change from */
forum.example.net
/* to */
forum.example.net/
cankaygisiz commented 6 months ago

This was not the exact problem, but, by pointing me to correct side of the problem, actually made me realize the issue. The problem was, I put a different name instead of "mylittleforum-master". My folder name under my XAMPP server was default (mylittleforum-master) but while making the installation I put a different name expecting it would work D: So I changed forum-address to default again and my website has pulled the CSS perfectly. Thank you for helping out. I made a silly mistake but learned a simple fundamental. Have a good day.

cankaygisiz commented 6 months ago

Edit: Everything is working perfect but I'm having this error with a normal user account 'Warning: Trying to access array offset on value of type bool in C:\xampp\htdocs\forum\includes\thread.inc.php on line 66'

It is not happening when I log in with admin account.

auge8472 commented 6 months ago

This was not the exact problem, but, by pointing me to correct side of the problem, actually made me realize the issue. The problem was, I put a different name instead of "mylittleforum-master". My folder name under my XAMPP server was default (mylittleforum-master) but while making the installation I put a different name expecting it would work

Ah, ok. Beside your wrong assumption I never expected a testing scenarion on a XAMPP-installation.

auge8472 commented 6 months ago

Edit: Everything is working perfect but I'm having this error with a normal user account Warning: Trying to access array offset on value of type bool in C:\xampp\htdocs\forum\includes\thread.inc.php on line 66

Let's look into the code. This is line 66 in the script includes/thread.inc.php of the latest release 20220803.1 (and also the current master). The script accesses the variable without checking its existence. That's clearly a bug. In other scripts in which the variable is used in a similar way, its existence is actually checked before it is used.

If one as the forum admin installs the forum and defines categories afterwards, one will never encounter the bug.

I'll open a new issue about this.