[TYPO3] Having a big problem with extensions like seminars in relation to mm database entries.

Andreas Balzer typo3 at andreas-balzer.de
Wed Feb 27 20:53:29 CET 2008


Benjamin Mack schrieb:
> With what TYPO3 version does this occur anyway?
I'm using 4.1.5.

> And: Did it work before or how did you get the 100 records in there?
They were creates some days ago and it worked fine. We have converted 
our database to utf-8 in the last days but the problem occured some 
hours later firtly. (directly after the conversion we hadn't problems 
noticable)

I have discussed with Oliver about it, here is what he said. It's a 
little bit longer but maybe you can get some more information with it.

Start of bug entry==============

Hello!
I just wanted to create a new seminar and what you can see attached 
happens in
the process when trying to create new seminars. It also happens with 
speakers,
..

The entries (seminar locations, speakers, ..) are located in various
sysfolders.

root
-europe
-asia
-...

What to do to solve this? I can provide a user acc.

Greetings,
Andreas

------- Comment #1 From Andreas Balzer 2008-02-26 20:21:35 CET [reply] 
-------

I just thought about what we did in the last couple of days: we migrated our
database from latin1_swedish_ci to utf-8. Some tables had allready utf-8,
others not. We have executed the following sql command. Any possibility that
this is related?
ALTER TABLE static_tsconfig_help CONVERT TO CHARACTER SET utf8 COLLATE
utf8_general_ci;
ALTER TABLE sys_be_shortcuts CONVERT TO CHARACTER SET utf8 COLLATE
utf8_general_ci;
ALTER TABLE sys_dmail CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE sys_dmail_category CONVERT TO CHARACTER SET utf8 COLLATE
utf8_general_ci;
ALTER TABLE sys_dmail_feuser_category_mm CONVERT TO CHARACTER SET utf8 
COLLATE
utf8_general_ci;
ALTER TABLE sys_dmail_group CONVERT TO CHARACTER SET utf8 COLLATE
utf8_general_ci;
ALTER TABLE sys_dmail_group_category_mm CONVERT TO CHARACTER SET utf8 
COLLATE
utf8_general_ci;
ALTER TABLE sys_dmail_group_mm CONVERT TO CHARACTER SET utf8 COLLATE
utf8_general_ci;
ALTER TABLE sys_dmail_maillog CONVERT TO CHARACTER SET utf8 COLLATE
utf8_general_ci;
ALTER TABLE sys_dmail_ttaddress_category_mm CONVERT TO CHARACTER SET utf8
COLLATE utf8_general_ci;
ALTER TABLE sys_dmail_ttcontent_category_mm CONVERT TO CHARACTER SET utf8
COLLATE utf8_general_ci;
ALTER TABLE sys_domain CONVERT TO CHARACTER SET utf8 COLLATE 
utf8_general_ci;
ALTER TABLE sys_filemounts CONVERT TO CHARACTER SET utf8 COLLATE
utf8_general_ci;
ALTER TABLE sys_history CONVERT TO CHARACTER SET utf8 COLLATE 
utf8_general_ci;
ALTER TABLE sys_language CONVERT TO CHARACTER SET utf8 COLLATE 
utf8_general_ci;
ALTER TABLE sys_lockedrecords CONVERT TO CHARACTER SET utf8 COLLATE
utf8_general_ci;
ALTER TABLE sys_log CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE sys_note CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE sys_preview CONVERT TO CHARACTER SET utf8 COLLATE 
utf8_general_ci;
ALTER TABLE sys_refindex CONVERT TO CHARACTER SET utf8 COLLATE 
utf8_general_ci;
ALTER TABLE sys_refindex_rel CONVERT TO CHARACTER SET utf8 COLLATE
utf8_general_ci;
ALTER TABLE sys_refindex_res CONVERT TO CHARACTER SET utf8 COLLATE
utf8_general_ci;
ALTER TABLE sys_refindex_words CONVERT TO CHARACTER SET utf8 COLLATE
utf8_general_ci;
ALTER TABLE sys_template CONVERT TO CHARACTER SET utf8 COLLATE 
utf8_general_ci;
ALTER TABLE sys_workspace CONVERT TO CHARACTER SET utf8 COLLATE
utf8_general_ci;
ALTER TABLE tt_address CONVERT TO CHARACTER SET utf8 COLLATE 
utf8_general_ci;
ALTER TABLE tt_content CONVERT TO CHARACTER SET utf8 COLLATE 
utf8_general_ci;
ALTER TABLE tx_dam CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE tx_dam_cat CONVERT TO CHARACTER SET utf8 COLLATE 
utf8_general_ci;
ALTER TABLE tx_dam_file_tracking CONVERT TO CHARACTER SET utf8 COLLATE
utf8_general_ci;
ALTER TABLE tx_dam_log_index CONVERT TO CHARACTER SET utf8 COLLATE
utf8_general_ci;
ALTER TABLE tx_dam_metypes_avail CONVERT TO CHARACTER SET utf8 COLLATE
utf8_general_ci;
ALTER TABLE tx_dam_mm_cat CONVERT TO CHARACTER SET utf8 COLLATE
utf8_general_ci;
ALTER TABLE tx_dam_mm_ref CONVERT TO CHARACTER SET utf8 COLLATE
utf8_general_ci;
ALTER TABLE tx_dam_selection CONVERT TO CHARACTER SET utf8 COLLATE
utf8_general_ci;
ALTER TABLE tx_danewslettersubscription_cat CONVERT TO CHARACTER SET utf8
COLLATE utf8_general_ci;
ALTER TABLE tx_danewslettersubscription_furels CONVERT TO CHARACTER SET utf8
COLLATE utf8_general_ci;
ALTER TABLE tx_danewslettersubscription_presets CONVERT TO CHARACTER SET 
utf8
COLLATE utf8_general_ci;
ALTER TABLE tx_impexp_presets CONVERT TO CHARACTER SET utf8 COLLATE
utf8_general_ci;
ALTER TABLE tx_macinabanners_banners CONVERT TO CHARACTER SET utf8 COLLATE
utf8_general_ci;
ALTER TABLE tx_macinabanners_categories CONVERT TO CHARACTER SET utf8 
COLLATE
utf8_general_ci;
ALTER TABLE tx_realurl_chashcache CONVERT TO CHARACTER SET utf8 COLLATE
utf8_general_ci;
ALTER TABLE tx_realurl_errorlog CONVERT TO CHARACTER SET utf8 COLLATE
utf8_general_ci;
ALTER TABLE tx_realurl_pathcache CONVERT TO CHARACTER SET utf8 COLLATE
utf8_general_ci;
ALTER TABLE tx_realurl_redirects CONVERT TO CHARACTER SET utf8 COLLATE
utf8_general_ci;
ALTER TABLE tx_realurl_urldecodecache CONVERT TO CHARACTER SET utf8 COLLATE
utf8_general_ci;
ALTER TABLE tx_realurl_urlencodecache CONVERT TO CHARACTER SET utf8 COLLATE
utf8_general_ci;
ALTER TABLE tx_rgsmoothgallery_image CONVERT TO CHARACTER SET utf8 COLLATE
utf8_general_ci;
ALTER TABLE tx_rtehtmlarea_acronym CONVERT TO CHARACTER SET utf8 COLLATE
utf8_general_ci;
ALTER TABLE tx_seminars_attendances CONVERT TO CHARACTER SET utf8 COLLATE
utf8_general_ci;
ALTER TABLE tx_seminars_attendances_checkboxes_mm CONVERT TO CHARACTER 
SET utf8
COLLATE utf8_general_ci;
ALTER TABLE tx_seminars_attendances_foods_mm CONVERT TO CHARACTER SET utf8
COLLATE utf8_general_ci;
ALTER TABLE tx_seminars_attendances_lodgings_mm CONVERT TO CHARACTER SET 
utf8
COLLATE utf8_general_ci;
ALTER TABLE tx_seminars_checkboxes CONVERT TO CHARACTER SET utf8 COLLATE
utf8_general_ci;
ALTER TABLE tx_seminars_event_types CONVERT TO CHARACTER SET utf8 COLLATE
utf8_general_ci;
ALTER TABLE tx_seminars_foods CONVERT TO CHARACTER SET utf8 COLLATE
utf8_general_ci;
ALTER TABLE tx_seminars_lodgings CONVERT TO CHARACTER SET utf8 COLLATE
utf8_general_ci;
ALTER TABLE tx_seminars_organizers CONVERT TO CHARACTER SET utf8 COLLATE
utf8_general_ci;
ALTER TABLE tx_seminars_payment_methods CONVERT TO CHARACTER SET utf8 
COLLATE
utf8_general_ci;
ALTER TABLE tx_seminars_seminars CONVERT TO CHARACTER SET utf8 COLLATE
utf8_general_ci;
ALTER TABLE tx_seminars_seminars_checkboxes_mm CONVERT TO CHARACTER SET utf8
COLLATE utf8_general_ci;
ALTER TABLE tx_seminars_seminars_feusers_mm CONVERT TO CHARACTER SET utf8
COLLATE utf8_general_ci;
ALTER TABLE tx_seminars_seminars_foods_mm CONVERT TO CHARACTER SET utf8 
COLLATE
utf8_general_ci;
ALTER TABLE tx_seminars_seminars_lodgings_mm CONVERT TO CHARACTER SET utf8
COLLATE utf8_general_ci;
ALTER TABLE tx_seminars_seminars_place_mm CONVERT TO CHARACTER SET utf8 
COLLATE
utf8_general_ci;
ALTER TABLE tx_seminars_seminars_speakers_mm CONVERT TO CHARACTER SET utf8
COLLATE utf8_general_ci;
ALTER TABLE tx_seminars_seminars_speakers_mm_leaders CONVERT TO 
CHARACTER SET
utf8 COLLATE utf8_general_ci;
ALTER TABLE tx_seminars_seminars_speakers_mm_partners CONVERT TO 
CHARACTER SET
utf8 COLLATE utf8_general_ci;
ALTER TABLE tx_seminars_seminars_speakers_mm_tutors CONVERT TO CHARACTER SET
utf8 COLLATE utf8_general_ci;
ALTER TABLE tx_seminars_sites CONVERT TO CHARACTER SET utf8 COLLATE
utf8_general_ci;
ALTER TABLE tx_seminars_speakers CONVERT TO CHARACTER SET utf8 COLLATE
utf8_general_ci;
ALTER TABLE tx_seminars_timeslots CONVERT TO CHARACTER SET utf8 COLLATE
utf8_general_ci;
ALTER TABLE tx_seminars_timeslots_speakers_mm CONVERT TO CHARACTER SET utf8
COLLATE utf8_general_ci;
ALTER TABLE tx_staticinfotables_hotlist CONVERT TO CHARACTER SET utf8 
COLLATE
utf8_general_ci;

------- Comment #2 From Niels Pardon 2008-02-26 20:36:43 CET [reply] -------

(In reply to comment #1)
 > I just thought about what we did in the last couple of days: we 
migrated our
 > database from latin1_swedish_ci to utf-8. Some tables had allready utf-8,
 > others not. We have executed the following sql command. Any 
possibility that
 > this is related?
 > ALTER TABLE static_tsconfig_help CONVERT TO CHARACTER SET utf8 COLLATE
 > utf8_general_ci;
[..]

So, this happens to all record-types which should have a M:M relation to the
events. Have you checked the M:M tables if there are some invalid entries?
(e.g. uid_local == 0)

------- Comment #3 From Andreas Balzer 2008-02-26 22:30:37 CET [reply] 
-------

I found some within tx_seminars_seminars_speakers_mm (same in place mm, etc)
(see screenshot). What does this mean and how to fix it?

------- Comment #4 From Andreas Balzer 2008-02-26 22:36:02 CET [reply] 
-------

Created an attachment (id=1744) [details]
some content of table tx_seminars_seminars_speakers_mm

------- Comment #5 From Niels Pardon 2008-02-26 22:43:22 CET [reply] -------

(In reply to comment #3)
 > I found some within tx_seminars_seminars_speakers_mm (same in place 
mm, etc)
 > (see screenshot). What does this mean and how to fix it?
 >

Well, this was just a guess. But I can explain why I guessed this would 
be the
reason of this issue.

When a new record is created the new record gets some random temporary 
UID like
"NEW123456". In t3lib_tcemain there is a mapping array which holds all new
record UIDs like the above one as array keys and after the new records have
been stored to the database the real UID as unsigned integers as array 
values.

Let's consider t3lib_tcemain checks the database for records related to 
a newly
created record via a M:M table using this mapping array. As the element 
in this
array with the temporary random UID "NEW123456" has no value this is
interpreted as "0" in PHP. So all M:M relation having the field 
uid_local equal
to "0" will be listed as elements related to the event.

So this is the explanation what is happening when there are M:M 
relations with
the field uid_local equal to "0". That's not the reason why there are those
records in your database. I can only guess that somehow your database 
queries
broke the events <-> something M:M relations. But don't ask me why or how.

------- Comment #6 From Niels Pardon 2008-02-26 22:53:40 CET [reply] -------

Just to add another note: I'm not sure if this is an issue we can solve 
within
seminars. In my opinion showing M:M relations having uid_local equal to 
"0" is
a normal and correct behavior of t3lib_tcemain.

It would be interesting if another extension having M:M relations 
suffered from
this issue in a similar way. AFAIK we use a common table design in the TYPO3
world for M:M relations so seminars shouldn't be the only extension 
suffering
from this issue.

If it is a problem related to the table design it should then be somehow
documented and/or tackled by the core development or the extension 
coordination
team (if there is a way to avoid this issue).

------- Comment #7 From Andreas Balzer 2008-02-26 23:03:34 CET [reply] 
-------

so firstly: shall we copy this into bugs.typo3.org or the typo3 newsgroup
somehow?
secondly: any way to fix this? I have hundreds of seminar entries and it
wouldn't be so nice to do everything again (i mean not every entry has 0 as
that attribute)

------- Comment #8 From Oliver Klee 2008-02-26 23:06:03 CET [reply] -------

Andreas, I propose deleting the entries with uid_local=0 OR uid_foreign=0
(using phpMyAdmin) and see whether the problem then still occurs. (I 
wonder how
these entries got created, though).

If you know how these entries got created and it is a bug in the TYPO3, it
makes sense to file a bug at bugs.typo3.org. Otherwise, I don't think that
would do any good.

------- Comment #9 From Andreas Balzer 2008-02-26 23:38:11 CET [reply] 
-------

okay.. it is working again. or at least it looks like. Thanks :)


End of bug entry==============

Any idea?

Greetings,
Andreas


More information about the TYPO3-english mailing list