Fli
05-02-2024, 06:07 AM
ISSUE:
Suddenly, vBulleting 4.x site has one or more following issues:
- displays no forums on the homepage
- post page shows "you do not have permission to access this page."
- texts that are displayed shows weird characters/diacritics (I had non-english vbulletin 4.x, meaning that I had secondary language set as a default: /admincp/language.php?do=edit_settings&dolanguageid=2)
FIX of a wrong characters/diacritics fix:
at /admincp/language.php?do=edit_settings&dolanguageid=2 HTML Character Set variable has been set to ISO-8859-1. Later I have set it to UTF-8 which fixed some homepage displayed texts.
Yet when editing some vbulletin post that contains diacritics and submitting, it saved the post text and title with questionmarks instead of some diacritic letters. After checking the database, the questionmarks was also inside a database, so to fix this, inside a database viewer (PHPMyAdmin, I went to the table "post" and on the "Structure" tab, i have changed columns "title" and "pagetext" collation from latin1_swedish_ci to utf8mb4_unicode_ci and then on the Operations tab, i did the same.
From that time, newly modified/submitted posts were correct. I am wondering why previous collation started causing problems and if i can leave it and do some more simple workaround.
UPDATE: upon exporting database from within DirectAdmin control panel, the post and title texts got damaged in the posts table (some diacritics characters turned into a question marks). Following SQL commands not helped:
ALTER TABLE post CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci;
ALTER TABLE post MODIFY title VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci;
ALTER TABLE post MODIFY pagetext mediumtext CHARACTER SET utf8 COLLATE utf8_unicode_ci;
Yet what seems to help is a conversion of all tables into UTF like this:
1) on the database run SQL query (first replacing "my_database_name" inside it):
SELECT CONCAT('ALTER TABLE ', TABLE_NAME, ' CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci;') FROM information_schema.TABLES WHERE TABLE_SCHEMA = 'my_database_name' AND TABLE_TYPE != 'VIEW';
2) click Extra options button and then radio button to see "Full texts". Copy the output into a text editor and remove extraordinary lines. Correct lines looks similar to:
ALTER TABLE post CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci;
3) adjusted output then paste into your SQL tab of your database in a PHPMyAdmin and run. It adjusted all tables and its rows collation to utf8mb3_unicode_ci. Somehow so far the text is not getting malformed by questionmarks.
Fix of a no vbulletin forums displayed on home/index:
- AdminCP/ Forums & Moderators / Forum manager ( /admincp/forum.php?do=modify ) displayed no forums. After i have created new "test" forum there, suddenly all forums appeared in manager and on the homepage. Also post page/s started loading.
Other related suggestions:
- one may also try changing theme or language
- one may also try editing includes/config.php and inside disabling all addons/hooks by appending new line: define('DISABLE_HOOKS', true);
- one may also try repaiting MySQL database and creating new database with imported backup and then switching to a new db inside includes/config.php. Same can be done for the files to test if the problem is inside files (rename public_html and restore public_html from backup, verifying the access rights are correct (755?) for newly uploaded folder.
ěščřžýáíé
Suddenly, vBulleting 4.x site has one or more following issues:
- displays no forums on the homepage
- post page shows "you do not have permission to access this page."
- texts that are displayed shows weird characters/diacritics (I had non-english vbulletin 4.x, meaning that I had secondary language set as a default: /admincp/language.php?do=edit_settings&dolanguageid=2)
FIX of a wrong characters/diacritics fix:
at /admincp/language.php?do=edit_settings&dolanguageid=2 HTML Character Set variable has been set to ISO-8859-1. Later I have set it to UTF-8 which fixed some homepage displayed texts.
Yet when editing some vbulletin post that contains diacritics and submitting, it saved the post text and title with questionmarks instead of some diacritic letters. After checking the database, the questionmarks was also inside a database, so to fix this, inside a database viewer (PHPMyAdmin, I went to the table "post" and on the "Structure" tab, i have changed columns "title" and "pagetext" collation from latin1_swedish_ci to utf8mb4_unicode_ci and then on the Operations tab, i did the same.
From that time, newly modified/submitted posts were correct. I am wondering why previous collation started causing problems and if i can leave it and do some more simple workaround.
UPDATE: upon exporting database from within DirectAdmin control panel, the post and title texts got damaged in the posts table (some diacritics characters turned into a question marks). Following SQL commands not helped:
ALTER TABLE post CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci;
ALTER TABLE post MODIFY title VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci;
ALTER TABLE post MODIFY pagetext mediumtext CHARACTER SET utf8 COLLATE utf8_unicode_ci;
Yet what seems to help is a conversion of all tables into UTF like this:
1) on the database run SQL query (first replacing "my_database_name" inside it):
SELECT CONCAT('ALTER TABLE ', TABLE_NAME, ' CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci;') FROM information_schema.TABLES WHERE TABLE_SCHEMA = 'my_database_name' AND TABLE_TYPE != 'VIEW';
2) click Extra options button and then radio button to see "Full texts". Copy the output into a text editor and remove extraordinary lines. Correct lines looks similar to:
ALTER TABLE post CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci;
3) adjusted output then paste into your SQL tab of your database in a PHPMyAdmin and run. It adjusted all tables and its rows collation to utf8mb3_unicode_ci. Somehow so far the text is not getting malformed by questionmarks.
Fix of a no vbulletin forums displayed on home/index:
- AdminCP/ Forums & Moderators / Forum manager ( /admincp/forum.php?do=modify ) displayed no forums. After i have created new "test" forum there, suddenly all forums appeared in manager and on the homepage. Also post page/s started loading.
Other related suggestions:
- one may also try changing theme or language
- one may also try editing includes/config.php and inside disabling all addons/hooks by appending new line: define('DISABLE_HOOKS', true);
- one may also try repaiting MySQL database and creating new database with imported backup and then switching to a new db inside includes/config.php. Same can be done for the files to test if the problem is inside files (rename public_html and restore public_html from backup, verifying the access rights are correct (755?) for newly uploaded folder.
ěščřžýáíé