News:

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

Main Menu

Forum opens blank page for guests on index.php

Started by zaks_bg, August 14, 2022, 02:16:40 PM

Previous topic - Next topic

zaks_bg

We have been trying to fix an issue with the forum (SMF 2.0.19) for quite some time. It seems guests can't open/load the forum home page. If they try a different forum page URL - it is ok. The problem does not seem to be related to the theme, it happens on the default themes too. Also registered users are ok to see the main forum page. The forum does not have any restrictions for the guests to see it.

Here is the home page, which can not load as guest:
https://motivirai.me/forum/ [nofollow]

And here is a random topic, which could be opened by anybody:
https://motivirai.me/forum/index.php/topic,48.msg1132.html [nofollow]

Also if you open the second link as a guest and try any of the pages above, but the main page - it will be fine, but if you click on the main page  "Начало" - again a blank page and the forum doesn't load... weird.

Please, any help would be appreciated.

Shambles

Hi,

Just to exclude one or two things, could you go to your admin panel > configuration > features & options > general and untick the box labeled "Search engine friendly URLs" (don't forget to hit the save button at the bottom).

And see if that makes a difference?

Also, anything pertinent in your forum error log?

Sir Osis of Liver

Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Doug Heffernan

When did this happen for the first time? What modifications/changes were made to the forum prior to it happening?

Sir Osis of Liver

Wasn't this reported recently?  IIRC (I may not), it was a permissions problem with a portal.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

zaks_bg

SE friendly links: disabled ... no improvement

Mods: The only one except the upgrades from 2.0.15 - 2.0.19 is Ad Managment 3.5d

Not sure when it happened for the first time, seems long time ago as I understand now.

The folder/files permissions are not any different than they should be - most of them being 755. Also looked at htaccess - no such file in the /forum subfolder, Have one in the main folder, but nothing concerning related to the /forum subfolder permissions

Kindred

If it happens only on the main forum page and not on any page that has an argument, like boards or message threads --  then the issue is almost definitely something that is displayed only on the main index page.
Try disabling the advert mod.

if not that, then load a clean set of files.
Сл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."

Dzonny

Maybe something was left in .htaccess file? Still looks like something that a url related mod would do.

SpacePhoenix


zaks_bg

Ok, I have been trying to replace all the files using the full upgrade option... and Im stuck at the FTP information.... created new FTP user especially for it... and still I cant pass it... :(( //All the info there is correct (even the admin login - tried disabling it too) but keeps getting me back to the same page without any errors




--
BTW I have found where the problem comes from (by just replacing file) ... it is from the Bulgarian translation of the core and default themes. If I don't update the themes with BG language ones (the most recent ones) - the forum loads ok... Needless to say - it does not work properly as all characters are unreadable... so I'm stuck for the moment... at least the Upgrade module should worked properly, alas it doesn't

Dzonny

Okay, let's go one step at the time.

Firstly use repair_settings.php to change default language to English.
Then try to click on list of files in upgrade.php page to see which files/directories should have chmod changed, and you can use FTP client to appropriately adjust those. Then you should be able to run upgrade without entering those FTP info.

zaks_bg

As I expected, it didn't work...

As a desperate step I uploaded my back-uped 'Settings_bak.php' (I didn't have such a file before that, as I delete all the files from /forum root, except settings.php and set it up to write mode.)... and guess what- the upgrade managed to finish :)... That's plain stupid. Please fix the upgrader to not need Settings_bak.php at all, why would it need it ??? (it really searches for such a file to be existent, while it shouldn't, as settings.php should be completely enough).

---
And The forum is completely not readable now (As I changed to english) - as its not meant to be read in English. But I am afraid if I overwrite the BG themes - again it won't be accessible for guests (verified - when I switch to Bulgarian language - it is again not accessible to guests on the main page)... anybody else with some ideas?

Dzonny

Upgrade should work really easy, please take a look at doc:
Upgrading SMF

Whatever language you're using on forum English as default language must be readable if everything is working fine.

So change default language to English, upload whole upgrade pack to forum root and overwrite current files, run upgrade.php and everything should work.
If you still need a hand with it you can pm me FTP details so I can take a look, if you feel comfortable for that.

zaks_bg

As I mentioned the upgrade is done already (and yes, being in English allows guests to load the main page BUT),  none of the content is readable on English settings, check it out yourself:
https://motivirai.me/forum/index.php [nofollow]

---
If I go to languages and set it to Bulgarian UTF-8 it becomes readable, but then the guests can't load the main page. If you have like 15mins, I can share screens with you via skype so you can try and help, please?

zaks_bg

LOL, I also noticed English default is ISO-8859-1 ... So I checked and downloaded English (UTF8) ... why there are diff versions of English, and why the default one in the default package is not UTF8 ???

Now the content is readable... but again the guests can't load the main page ... what a mess :)

---
To summarize
if english ISO-8859-1 -> forum not readable but guests can load the main page
if english UTF-8 or Bulgarian UTF-8 -> forum is readable and guests can not load the main page

Dzonny

There are reasons why 2.0 branch had two set of language files. 2.1 branch is utf8 by default. Have you consider upgrading to 2.1 maybe?

I can't access index.php at this point.

When you say that the content is not readable, you mean the posts itself? The ones written in cyrilic characters?

Also, you haven't answered to my question about .htaccess file, do you have it, and if so, can you attach it pls?

zaks_bg

you can open a random page like
https://motivirai.me/forum/index.php?topic=48 [nofollow]
but not the 'home / начало' page

--
No htaccess file on forum lvl, just one in my main folder but it has nothing to do with the forum, here is the content, only some https rewrites and deny for xmlrpc hacks:

<FilesMatch "xmlrpc\.php$">
order deny,allow
deny from all
</FilesMatch>
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{SERVER_NAME}/$1 [R=301,L]

# BEGIN WordPress
# The directives (lines) between "BEGIN WordPress" and "END WordPress" are
# dynamically generated, and should only be modified via WordPress filters.
# Any changes to the directives between these markers will be overwritten.
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

Dzonny

Can you please try to remove the whole wp part of the code from .htaccess just temporarly to see if there's any change.

So the file should look like:

<FilesMatch "xmlrpc\.php$">
order deny,allow
deny from all
</FilesMatch>
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{SERVER_NAME}/$1 [R=301,L]

zaks_bg

Already have tried this before, tried it now again... no improvement
Also, I have tried deleting completely the htaccess file... no improvement

Obviously the problem is somewhat related to the UTF-8 languages and/or UTF8 DB ... as if non-UTF8 language is selected the main page loads... it's unreadable (yes - the content/the Cyrillic) though

Kindred

you can not just use the UTF8 language pack.

In 2.0.x, if you are using the UTF8 language, then you ALSO need to have your database set to use UTF8 for collation.

It sounds like - somehow, you have gotten your forum into a state where it doesn't know what to do.
Сл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."

Advertisement: