Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2008-08-04 22:19:10

whaleen
Member
From: Portland
Registered: 2006-05-11
Posts: 373
Website

Image uploading problem

Warning: Duplicate entry ‘0’ for key 1 insert into txp_image set name = ‘Picture 1.png’, ext = ‘.png’, w = 716, h = 538, alt = ‘’, caption = ‘’, category = ‘’, date = now(), author = ‘authorname’ in/textpattern/lib/txplib_db.php on line 84

When uploading an image which doesn’t make it into he DB.


txtstrap (Textpattern + Twitter Bootstrap + etc…)

Offline

#2 2008-08-04 22:43:55

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,306

Re: Image uploading problem

Hm, don’t get it. Took your line, (insert into txp_image set name = 'Picture 1.png', ext = '.png', w = 716, h = 538, alt = '', caption = '', category = '', date = now(), author = 'authorname' changed the curly quotes to straight ones,) and injected it as SQL into phpMyAdmin: worked instantly.

Is this the only image that didn’t work or do you have such problems generally?

Last edited by uli (2008-08-04 22:45:22)


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#3 2008-08-04 22:53:50

whaleen
Member
From: Portland
Registered: 2006-05-11
Posts: 373
Website

Re: Image uploading problem

Hm, don’t get it. Took your line, (insert into txp_image set name = ‘Picture 1.png’, ext = ‘.png’, w = 716, h = 538, alt = ‘’, caption = ‘’, category = ‘’, date = now(), author = ‘authorname’ changed the curly quotes to straight ones,) and injected it as SQL into phpMyAdmin: worked instantly.

Is this the only image that didn’t work or do you have such problems generally?

I don’t know much about this waters I’m in but in the ‘Extra’ column of the ‘ID’ rows need to have auto_increment set.

I ran this query:

ALTER TABLE `txp_image` CHANGE `id` `id` INT NOT NULL AUTO_INCREMENT

A google search for ‘duplicate entry auto_increment” showed me what to do in PHPMyAdmin to set table rows to auto_increment. In my case the ID rows for links and images solved my problems. I can now upload images and add links again.

Problem is solved.

Last edited by whaleen (2008-08-04 22:56:43)


txtstrap (Textpattern + Twitter Bootstrap + etc…)

Offline

Board footer

Powered by FluxBB