ปัญหาที่เจอจะแจ้ง error 1146 ..postinstall_message doesn't exist .. ในขั้นตอนการอัพเดทจาก Joomla 3.1.5 ไปเป็น Joomla 3.2 เราไปดูวิธีการแก้ไขกันครับ

 

ตัวอย่างข้อความแสดง Error 11146 ...postinstall_message doesn't exist...

 

ขั้นตอนการอัพเดท Joomla 3.1.5 ไปเป็น Joomla 3.2
สำหรับการอัพเดทเราสามารถก็อปปี้ไฟล์ของ Joomla 3.2 ไปทับไฟล์ของ Joomla 3.1.5 ได้เลย
1. ก่อนอื่นเราไปดาวน์โหลดไฟล์สำหรับอัพเดท Joomla 3.1.5 เป็น Joomla 3.2 กันก่อนไปดาวน์โหลดได้ที่ http://www.joomla.org/download.html
2. คลิกเลือก Upgrade Packages

 

3. คลิกเลือก Joomla_3.2.0-Stable-Update_Package.zip เพื่อดาวน์โหลด
4. ตัวอย่างไฟล์ที่ได้ดาวน์โหลดมาแล้ว Joomla_3.2.0-Stable-Update_Package_3.zip

 

5. ให้จัดการแตกไฟล์ Zip ตัวอย่างไฟล์ที่ได้แตกไฟล์ซิพเรียบร้อยแล้ว

 

เริ่มการอัพเดท Joomla 3.1.5 ไปเป็น Joomla 3.2
1. ก่อนจะอัพเดทให้ก็อปปี้ไฟล์ของ Joomla 3.1.5 เก็บไว้ก่อน โดยเฉพาะท่านใดที่ใช้เทมเพลทมาตรฐานของ Joomla อย่าง Beez3 หรือ Protostar ต้องก็อปปี้เก็บไว้ก่อน
2. จัดการก็อปปี้ไฟล์สำหรับอัพเกรด Joomla 3.2 ไปทับไฟล์ของ Joomla 3.1.5

 

3. หลังจากนั้นให้เข้าระบบ Joomla ในฐานะผู้ดูแลหรือ admin ซึ่งจะพบกับข้อความ Error 1146 คล้ายตัวอย่าง สิ่งที่้ต้องใส่ใจก็คือ ชื่อตารางข้อมูลเช่น cf8dl_ ให้จดไว้ก่อน

 

4. ให้เข้าโปรแกรม PhpMyAdmin แล้วเปิดฐานข้อมูลของเราขึ้นมา เช่น newkm
5. คลิก SQL

 

6. จัดการก็อปปี้โค้ดเหล่านี้ลงไป โดยจะต้องแก้ไขชื่อตารางข้อมูลให้ตรงกันกับชื่อตารางข้อมูลของเรา ตัวอย่างจะเปิดโค้ดขึ้นมาแก้ไขใน Notepad
7. สำหรับโค้ดที่จะนำไปใช้ก็อปปี้ด้านล่างนี้ไปได้เลยครับ โดยแก้ไขชื่อตารางข้อมูลให้ตรงกันจากตัวอย่าง hcro1_ จะเป็นตารางข้อมูลในเว็บไซต์ของผม ให้จัดการแก้ไขโดยเปิดไฟล์นี้ใน Notepad แล้วใช้คำสั่ง Replace ค้นหาและแทนที่ทั้งหมด

--
-- Table structure for table `hcro1_postinstall_messages`
--

CREATE TABLE IF NOT EXISTS `hcro1_postinstall_messages` (
`postinstall_message_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`extension_id` bigint(20) NOT NULL DEFAULT '700' COMMENT 'FK to #__extensions',
`title_key` varchar(255) NOT NULL DEFAULT '' COMMENT 'Lang key for the title',
`description_key` varchar(255) NOT NULL DEFAULT '' COMMENT 'Lang key for description',
`action_key` varchar(255) NOT NULL DEFAULT '',
`language_extension` varchar(255) NOT NULL DEFAULT 'com_postinstall' COMMENT 'Extension holding lang keys',
`language_client_id` tinyint(3) NOT NULL DEFAULT '1',
`type` varchar(10) NOT NULL DEFAULT 'link' COMMENT 'Message type - message, link, action',
`action_file` varchar(255) DEFAULT '' COMMENT 'RAD URI to the PHP file containing action method',
`action` varchar(255) DEFAULT '' COMMENT 'Action method name or URL',
`condition_file` varchar(255) DEFAULT NULL COMMENT 'RAD URI to file holding display condition method',
`condition_method` varchar(255) DEFAULT NULL COMMENT 'Display condition method, must return boolean',
`version_introduced` varchar(50) NOT NULL DEFAULT '3.2.0' COMMENT 'Version when this message was introduced',
`enabled` tinyint(3) NOT NULL DEFAULT '1',
PRIMARY KEY (`postinstall_message_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=5 ;

--
-- Dumping data for table `hcro1_postinstall_messages`
--

INSERT INTO `hcro1_postinstall_messages` (`postinstall_message_id`, `extension_id`, `title_key`, `description_key`, `action_key`, `language_extension`, `language_client_id`, `type`, `action_file`, `action`,`condition_file`, `condition_method`, `version_introduced`, `enabled`) VALUES
(1, 700, 'PLG_TWOFACTORAUTH_TOTP_POSTINSTALL_TITLE', 'PLG_TWOFACTORAUTH_TOTP_POSTINSTALL_BODY', 'PLG_TWOFACTORAUTH_TOTP_POSTINSTALL_ACTION', 'plg_twofactorauth_totp', 1,'action', 'site://plugins/twofactorauth/totp/postinstall/actions.php', 'twofactorauth_postinstall_action', 'site://plugins/twofactorauth/totp/postinstall/actions.php', 'twofactorauth_postinstall_condition', '3.2.0', 1),
(2, 700, 'COM_CPANEL_MSG_EACCELERATOR_TITLE', 'COM_CPANEL_MSG_EACCELERATOR_BODY', 'COM_CPANEL_MSG_EACCELERATOR_BUTTON', 'com_cpanel', 1, 'action','admin://components/com_admin/postinstall/eaccelerator.php', 'admin_postinstall_eaccelerator_action', 'admin://components/com_admin/postinstall/eaccelerator.php','admin_postinstall_eaccelerator_condition', '3.2.0', 1),
(3, 700, 'COM_CPANEL_WELCOME_BEGINNERS_TITLE', 'COM_CPANEL_WELCOME_BEGINNERS_MESSAGE', '', 'com_cpanel', 1, 'message', '', '', '', '', '3.2.0', 1),
(4, 700, 'PLG_USER_JOOMLA_POSTINSTALL_STRONGPW_TITLE', 'PLG_USER_JOOMLA_POSTINSTALL_STRONGPW_TEXT', 'PLG_USER_JOOMLA_POSTINSTALL_STRONGPW_BTN', 'plg_user_joomla', 1,'action', 'site://plugins/user/joomla/postinstall/actions.php', 'plguserjoomla_postinstall_action', 'site://plugins/user/joomla/postinstall/actions.php', 'plguserjoomla_postinstall_condition', '3.2.0', 1);

 

8. จากนั้นจึงก็อปปี้ไปวางใน PhpMyAdmin จัดการก็อปปี้ลงไป แล้วคลิก Go

 

จบการแก้ปัญหา error 1146 เกี่ยวกับ Postsinstall สำหรับการอัพเดทจาก Joomla 3.1.5 เป็น 3.2