Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Plugins] Akismet 1.2.1 installation error #282

Closed
nmalcolm opened this issue Mar 3, 2014 · 10 comments

Comments

Projects
None yet
5 participants
@nmalcolm
Copy link
Contributor

commented Mar 3, 2014

On click to install & acivate :

MyBB has experienced an internal SQL error and cannot continue. SQL Error: - Query: ALTER TABLE mybb_users ADD akismetstopped int NOT NULL default 0

Original report: http://dev.mybb.com/issues/1816
Reporter: Benjamin Nolmans
Status: Confirmed

@nmalcolm nmalcolm added bug labels Mar 3, 2014

@nmalcolm nmalcolm added the sqlite label Mar 11, 2014

@nmalcolm

This comment has been minimized.

Copy link
Contributor Author

commented Mar 14, 2014

The query looks fine... so I don't understand why it doesn't like it.

@ImadJomaa @Polarbear541 @JN-Jones Any idea?

@ImadJomaa

This comment has been minimized.

Copy link
Contributor

commented Mar 14, 2014

I just ran a copy of the query in the sqlite shell, works just fine. The problem may be in the db_sqlite.php file. In particular, the query function -> alter handler function. I haven't had a look at it, but you may find the error in there. Nothing more than a guess at this point though.

@nmalcolm

This comment has been minimized.

Copy link
Contributor Author

commented Mar 14, 2014

Found the issue.

                // SQLITE 3 supports ADD Alter statements
                if(strtolower(substr(ltrim($string), 0, 3)) == 'add')
                {
                    $query = $this->db->query($string);
                }
                else
                {
                    $query = $this->alter_table_parse($tablename, $alterdefs, $string);
                }

if(strtolower(substr(ltrim($string), 0, 3)) == 'add') <- This actually turns out to be 'alt' because the wrong variable is used. Instead of $string it should be $alterdefs.

@nmalcolm nmalcolm added fixed and removed confirmed labels Mar 14, 2014

@nmalcolm nmalcolm closed this in f92bf9f Mar 16, 2014

JN-Jones added a commit that referenced this issue Mar 16, 2014

Merge pull request #387 from nmalcolm/fix-282
Fix #282 [Plugins] Akismet 1.2.1 installation error
@JN-Jones

This comment has been minimized.

Copy link
Contributor

commented Mar 16, 2014

Is there any reason why you haven't fixed this in 1.8?

@JN-Jones JN-Jones reopened this Mar 16, 2014

@JN-Jones JN-Jones added feedback and removed feedback labels Mar 16, 2014

@JordanMussi

This comment has been minimized.

Copy link
Contributor

commented Mar 16, 2014

I thought a akismet wasn't going to be included, or was that 2.0?

@JN-Jones

This comment has been minimized.

Copy link
Contributor

commented Mar 16, 2014

Not sure but the issue isn't within akisment, it's in our sqlite handler.

@JordanMussi

This comment has been minimized.

Copy link
Contributor

commented Mar 16, 2014

Ah, there's me only reading the title. 😊

@nmalcolm

This comment has been minimized.

Copy link
Contributor Author

commented Mar 16, 2014

@JN-Jones I was going to send a pull for 1.8 after SQA confirmed the fix was correct. Perhaps there's a better way to manage this -- something I'll look in to.

@ImadJomaa

This comment has been minimized.

Copy link
Contributor

commented Apr 21, 2014

@JN-Jones You seem to have confirmed the fix for this for 1.6 ( #387 ), @PaulBender you fixed this for 1.8, are we therefore clear on this now?

@JN-Jones

This comment has been minimized.

Copy link
Contributor

commented Apr 21, 2014

Yeah

@JN-Jones JN-Jones closed this Apr 21, 2014

@PirataNervo PirataNervo added this to the 1.8 Beta 1 milestone May 31, 2014

@JordanMussi JordanMussi removed the feedback label Jul 21, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.