Project

General

Profile

Actions

Bug #23290

closed

After IMPORTing data from mysqldump with the install tool, new content cannot be inserted

Added by Jan Simbera over 14 years ago. Updated almost 11 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Database API (Doctrine DBAL)
Target version:
-
Start date:
2010-07-28
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.3
PHP Version:
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

After a fresh install of typo3 - ver 4.3.3 on IIS 6 and MSSQL server via ODBC drivers. ( Used the typo3 tutorial on WIKI and also Xaviers http://xavier.perseguers.ch/en/tutorials/typo3/articles/mssql-database.html ). I imported some tables with the a dump from the old mysql DB,with parameters given in the DBAL extension manual (http://typo3.org/documentation/document-library/extension-manuals/dbal/0.9.9/view/1/7/). After the import i can see all the records (pages, tt_content records, etc.) in BE. I can modify them, delete them. But if i want to create a new record, it isn't saved and i get an error message "Sorry, you didn't have proper permissions to perform this change.". If i click save and close, no message is even shown and the record isnt save either.

It affects all the tables i import data to. If i just import pages, then tt_content can be addded, etc.

I must say, the import is from and older version of typo 4.0.2. But no error messages are shown with the import.

Extensions used:

DBAL ver 1.0.4 with patches (http://xavier.perseguers.ch/en/tutorials/typo3/articles/mssql-database.html)
ADOdb ver 5.10.0

(issue imported from #M15268)

Actions #1

Updated by Xavier Perseguers over 14 years ago

Hi,

Current version of DBAL for TYPO3 4.3 is 1.0.5. Which patches did you apply? Could you activate debug mode to see which queries are faulty?

Thanks.

Actions #2

Updated by Jan Simbera over 14 years ago

I did aplly the this patch http://bugs.typo3.org/view.php?id=4640, which solved the BE login problem for me. And tried to download the trunk versions of the t3lib db and sqlparser.

I turned up the debug mode and the problem statements is this:
INSERT INTO "pages" ( "doktype", "hidden", "starttime", "endtime", "layout", "urltype", "lastUpdated", "newUntil", "cache_timeout", "shortcut_mode", "module", "perms_userid", "perms_groupid", "perms_user", "perms_group", "perms_everybody", "sorting", "pid", "no_search", "nav_hide", "title", "alias", "target", "no_cache", "subtitle", "fe_group", "extendToSubpages", "php_tree_stop", "editlock", "storage_pid", "is_siteroot", "l18n_cfg", "crdate", "cruser_id", "tstamp", "t3ver_stage", "uid" ) VALUES ( '1', '0', '0', '0', '0', '1', '0', '0', '0', '0', '', '1', '0', '31', '27', '0', '256', '3', '0', '0', 'newcontent', '', '', '0', '', '', '0', '0', '0', '0', '0', '0', '1280389843', '1', '1280389843', '0', '6' ) -- 1 CLOB FIELDS: "TSconfig"

It shows no error in the log, but the UID is wrong. 6 is an existing page, the last UID in table dbo.pages is 64, so it should be 65. Like when i import the data the uid doesn't increment properly.

The dbo.pages description is the following:
/****** Object: Table [dbo].[pages] Script Date: 07/29/2010 10:10:38 **/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[pages](
[uid] [bigint] NOT NULL,
[pid] [bigint] NOT NULL DEFAULT ((0)),
[t3ver_oid] [bigint] NOT NULL DEFAULT ((0)),
[t3ver_id] [bigint] NOT NULL DEFAULT ((0)),
[t3ver_wsid] [bigint] NOT NULL DEFAULT ((0)),
[t3ver_label] [varchar](255) NOT NULL DEFAULT (''),
[t3ver_state] [bigint] NOT NULL DEFAULT ((0)),
[t3ver_stage] [bigint] NOT NULL DEFAULT ((0)),
[t3ver_count] [bigint] NOT NULL DEFAULT ((0)),
[t3ver_tstamp] [bigint] NOT NULL DEFAULT ((0)),
[t3ver_swapmode] [bigint] NOT NULL DEFAULT ((0)),
[t3ver_move_id] [bigint] NOT NULL DEFAULT ((0)),
[t3_origuid] [bigint] NOT NULL DEFAULT ((0)),
[tstamp] [bigint] NOT NULL DEFAULT ((0)),
[sorting] [bigint] NOT NULL DEFAULT ((0)),
[deleted] [bigint] NOT NULL DEFAULT ((0)),
[perms_userid] [bigint] NOT NULL DEFAULT ((0)),
[perms_groupid] [bigint] NOT NULL DEFAULT ((0)),
[perms_user] [bigint] NOT NULL DEFAULT ((0)),
[perms_group] [bigint] NOT NULL DEFAULT ((0)),
[perms_everybody] [bigint] NOT NULL DEFAULT ((0)),
[editlock] [bigint] NOT NULL DEFAULT ((0)),
[crdate] [bigint] NOT NULL DEFAULT ((0)),
[cruser_id] [bigint] NOT NULL DEFAULT ((0)),
[hidden] [bigint] NOT NULL DEFAULT ((0)),
[title] [varchar](255) NOT NULL DEFAULT (''),
[doktype] [bigint] NOT NULL DEFAULT ((0)),
[TSconfig] [text] NULL,
[storage_pid] [bigint] NOT NULL DEFAULT ((0)),
[is_siteroot] [bigint] NOT NULL DEFAULT ((0)),
[php_tree_stop] [bigint] NOT NULL DEFAULT ((0)),
[tx_impexp_origuid] [bigint] NOT NULL DEFAULT ((0)),
[url] [varchar](255) NOT NULL DEFAULT (''),
[starttime] [bigint] NOT NULL DEFAULT ((0)),
[endtime] [bigint] NOT NULL DEFAULT ((0)),
[urltype] [bigint] NOT NULL DEFAULT ((0)),
[shortcut] [bigint] NOT NULL DEFAULT ((0)),
[shortcut_mode] [bigint] NOT NULL DEFAULT ((0)),
[no_cache] [bigint] NOT NULL DEFAULT ((0)),
[fe_group] [varchar](100) NOT NULL DEFAULT ((0)),
[subtitle] [varchar](255) NOT NULL DEFAULT (''),
[layout] [bigint] NOT NULL DEFAULT ((0)),
[target] [varchar](80) NOT NULL DEFAULT (''),
[media] [text] NULL,
[lastUpdated] [bigint] NOT NULL DEFAULT ((0)),
[keywords] [text] NULL,
[cache_timeout] [bigint] NOT NULL DEFAULT ((0)),
[newUntil] [bigint] NOT NULL DEFAULT ((0)),
[description] [text] NULL,
[no_search] [bigint] NOT NULL DEFAULT ((0)),
[SYS_LASTCHANGED] [bigint] NOT NULL DEFAULT ((0)),
[abstract] [text] NULL,
[module] [varchar](10) NOT NULL DEFAULT (''),
[extendToSubpages] [bigint] NOT NULL DEFAULT ((0)),
[author] [varchar](255) NOT NULL DEFAULT (''),
[author_email] [varchar](80) NOT NULL DEFAULT (''),
[nav_title] [varchar](255) NOT NULL DEFAULT (''),
[nav_hide] [bigint] NOT NULL DEFAULT ((0)),
[content_from_pid] [bigint] NOT NULL DEFAULT ((0)),
[mount_pid] [bigint] NOT NULL DEFAULT ((0)),
[mount_pid_ol] [bigint] NOT NULL DEFAULT ((0)),
[alias] [varchar](32) NOT NULL DEFAULT (''),
[l18n_cfg] [bigint] NOT NULL DEFAULT ((0)),
[fe_login_mode] [bigint] NOT NULL DEFAULT ((0)),
PRIMARY KEY CLUSTERED
(
[uid] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]

GO
SET ANSI_PADDING OFF

I don't know but shouldn't there be a IDENTITY or something like that set on the table. If i try to execute the SQL statement manualy in query window the error is expectingly giving me

Msg 2627, Level 14, State 1, Line 1
Violation of PRIMARY KEY constraint 'PK__pages__7EACC042'. Cannot insert duplicate key in object 'dbo.pages'.

Actions #3

Updated by Alexander Opitz about 11 years ago

  • Status changed from New to Needs Feedback
  • Target version deleted (0)
  • TYPO3 Version set to 4.3
  • Is Regression set to No

Hi,

as this issue is very old. Does the problem still exists within newer versions of TYPO3 CMS (4.5 or 6.1)?

The problem is, that MSSQL don't have a function like "AutoIncrement" from MySQL, so there is an extra table/view which holds the last insert ID, this seams to be not up to date after the import.

Actions #4

Updated by Alexander Opitz almost 11 years ago

  • Status changed from Needs Feedback to Closed

No feedback within the last 90 days => closing this ticket.

If you think that this is the wrong decision or experience this issue again, then please write to the mailing list typo3.teams.bugs with issue number and an explanation or open a new ticket and add a relation to this ticket number.

Actions

Also available in: Atom PDF