Author Topic: Gallery Import Error  (Read 1773 times)

0 Members and 1 Guest are viewing this topic.

Offline jonward55

  • New Users
  • Newbie
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Gallery Import Error
« on: March 05, 2016, 09:04:16 AM »
Hi Guys,

I have had TgpX(SE) installed for years and made the modifications to make it work with the latest PHP.

The only thing I cant fix is importing galleries, I have tried pasting them into the box and uploading text files.

The first 2 in the list get imported then the script fails with the following.

Has anyone else been able to fix this ?

Thanks


Fatal Error
Error:
Duplicate entry '0' for key 'PRIMARY'
INSERT INTO `tx_gallery_fields` VALUES ()

Trace:
trigger_error in mysql.class.php on line 154
Update in index.php on line 3057
call_user_func in index.php on line 57

Offline longsack

  • New Users
  • Newbie
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Re: Gallery Import Error
« Reply #1 on: April 06, 2016, 09:42:10 PM »
Delete "tx_gallery_fields" from your MySql database...

Once tx_gallery_fields has been deleted from your database run the following to import a new structure for tx_gallery_fields.  You could just alter the table, but this is the easy way in my mind as long as you have nothing in the database.



CREATE TABLE IF NOT EXISTS `tx_gallery_fields` (
`gallery_id` int(11) NOT NULL
) ENGINE=MyISAM AUTO_INCREMENT=0 DEFAULT CHARSET=latin1;


ALTER TABLE `tx_gallery_fields`
 ADD PRIMARY KEY (`gallery_id`);

ALTER TABLE `tx_gallery_fields`
MODIFY `gallery_id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=0;


It will work now!
« Last Edit: April 07, 2016, 07:49:17 PM by longsack »

Offline jollyhumper

  • Newbie
  • *
  • Posts: 3
  • Karma: +10/-0
    • View Profile
Re: Gallery Import Error
« Reply #2 on: December 01, 2016, 08:27:53 AM »
I wasn't able to quote the text, but I have the same error.

I just have no clue how to do what you answer. How do I make this work?

Jolly

Unofficial JMB Support Forums

Re: Gallery Import Error
« Reply #2 on: December 01, 2016, 08:27:53 AM »


Tags:
 

Related Topics

  Subject / Started by Replies Last post
20 Replies
3607 Views
Last post September 16, 2012, 04:24:55 PM
by alex7c
1 Replies
1061 Views
Last post September 25, 2012, 08:19:52 PM
by Chad
2 Replies
1523 Views
Last post November 18, 2013, 02:23:28 PM
by a4evermedia
0 Replies
1025 Views
Last post October 04, 2015, 07:33:25 AM
by amebb
3 Replies
1677 Views
Last post June 22, 2016, 06:12:05 AM
by peeperd

anything