| |
| | |

CodersClub

 Forgot password?
 Register
Search
View: 11922|Reply: 19
Collapse the left

r12: Database error

[Copy link]
Post time: 2012-02-26 00:49
| Show all posts |Read mode
Edited by charafweb at 2012-2-25 21:54

Hello Vot,
There is a problem with the last revision (r12), after i installed i got this message error:
  1. (1146) Table 'ultrax25.common_template_block' doesn't exist.
Copy the Code

ultrax25 is my database name.


Thanks


 Russia

Post time: 2012-02-26 09:33
| Show all posts
It is strange...
because of the table creating is exists in install.sql:
  1. DROP TABLE IF EXISTS pre_common_template_block;
  2. CREATE TABLE pre_common_template_block (
  3.   targettplname varchar(255) NOT NULL DEFAULT '',
  4.   tpldirectory varchar(255) NOT NULL DEFAULT '',
  5.   bid int(11) unsigned NOT NULL DEFAULT '0',
  6.   PRIMARY KEY (targettplname,bid),
  7.   KEY bid (bid)
  8. ) TYPE=MyISAM;
Copy the Code
What the table prefix you have set when install?
 Author| Post time: 2012-02-26 09:59
| Show all posts
I left the default prefix: pre_

This post contains more resources

You have to Login for download or view attachment(s). No Account? Register

x
 Author| Post time: 2012-02-26 10:09
| Show all posts
Here are more screenshots:
setings:



after this page:



I got this message:



After rafreshing (F5) I got this



After a second F5 i got this:





This post contains more resources

You have to Login for download or view attachment(s). No Account? Register

x

 Russia

Post time: 2012-02-26 10:17
| Show all posts
Try to modify the install.sql:

  1. DROP TABLE IF EXISTS pre_common_template_block;
  2. CREATE TABLE pre_common_template_block (
  3.   targettplname varchar(255) NOT NULL DEFAULT '',
  4.   bid int(11) unsigned NOT NULL DEFAULT '0',
  5.   PRIMARY KEY (bid),
  6.   KEY targettplname (targettplname)
  7. ) TYPE=MyISAM;
Copy the Code
 Author| Post time: 2012-02-26 10:26
| Show all posts


the same problem


This post contains more resources

You have to Login for download or view attachment(s). No Account? Register

x

 Russia

Post time: 2012-02-26 11:52
| Show all posts
I have understanded the problem!
It is a bug in the X2.5 table driver: table_common_template_block.php
It uses this command:
  1.                 return $tpl ? DB::delete($this->_table, DB::field('targettplname', $tpl)) : false;
Copy the Code
But "$this->_table" does NOT contain the real table prefix!
I think, this must be modified to:
  1.                 return $tpl ? DB::delete(DB::table($this->_table), DB::field('targettplname', $tpl)) : false;
Copy the Code
The same bug presents in many other places!
If you see any direct using of "$this->_table",
it must be replaced with "DB::table($this->_table)"


 Author| Post time: 2012-02-26 17:09
| Show all posts
I did as you said, I replaced all "$this->_table" with "DB::table($this->_table)", in all files (using search and replace, a Funduc soft). At the end of creating tables, there was a message error (in red), that i couldn't read because the page redirect quickly to the last step (page) where it's said "Installation successfully completed! Click here to enter your Discuz! X2". When I clicked the link a got a blank page. There is something wrong!

 Russia

Post time: 2012-02-26 18:13
| Show all posts
said "Installation successfully completed!

This is nice
Click here to enter your Discuz! X2". When I clicked the link a got a blank page. There is something wrong!

Check the language pack...
 Author| Post time: 2012-02-26 20:01
| Show all posts
Hi,
I made a fresh install and recorded my screen to take a screenshot of the error message:



What language pack you meant? I did not change anything in your files (donloaded from svn repository), except repalcing all "$this->_table" with "DB::table($this->_table)"

This post contains more resources

You have to Login for download or view attachment(s). No Account? Register

x
You have to log in before you can reply Login | Register

Points Rules

Archive|Mobile|Dark room|CodersClub

Top.Mail.Ru
Top.Mail.Ru

2024-04-25 16:22 GMT+3 , Processed in 0.092966 sec., 8 queries .

Powered by Discuz! X3.4 Release 20230520

© 2001-2024 Discuz! Team.

MultiLingual version, Rev. 4301, © codersclub.org

Quick Reply To Top Return to the list