Project

General

Profile

Actions

Bug #17374

closed

Combination mode doesn't save new child records correctly

Added by Franz Holzinger almost 17 years ago. Updated almost 16 years ago.

Status:
Closed
Priority:
Should have
Assignee:
Category:
-
Target version:
-
Start date:
2007-06-11
Due date:
% Done:

0%

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

Description

I am adding child table elements to a parent element via a mm-parent-child table. After the first or second insert I end up in an error message:

1: Attempt to modify record '' (tx_irretest_child:0) without permission. Or non-existing page.

Nothing can be continued from here. The uid_parent has been stored as a 0 which is the reason for this error message.
Btw. the records seems to be listed twice instead of once after having wanted to add only one additional child record.

IRRE-Type: m:n asymmetric combo (with select on both sides of the intermediate table)
(issue imported from #M5772)


Files

T3X_irretest-0_0_0-z-200706111743.t3x (3.11 KB) T3X_irretest-0_0_0-z-200706111743.t3x Administrator Admin, 2007-06-11 17:42
irretest-1.png (220 KB) irretest-1.png Administrator Admin, 2007-06-18 08:22
irretest-2.png (22.7 KB) irretest-2.png Administrator Admin, 2007-06-18 08:23
irretest-3.png (16.4 KB) irretest-3.png Administrator Admin, 2007-06-18 08:23
irretest-a-1.png (20.7 KB) irretest-a-1.png Administrator Admin, 2007-06-18 18:28
T3X_irretest-0_0_0-z-200706181906.t3x (3.13 KB) T3X_irretest-0_0_0-z-200706181906.t3x Administrator Admin, 2007-06-18 19:04
irretest-b-1.png (16.2 KB) irretest-b-1.png Administrator Admin, 2007-06-18 19:04
irretest-b-2.png (16.7 KB) irretest-b-2.png Administrator Admin, 2007-06-18 19:13
T3X_np_status_input-0_1_1-z-200709061501.t3x (50.3 KB) T3X_np_status_input-0_1_1-z-200709061501.t3x Administrator Admin, 2007-09-06 15:01
0005772.patch (2.1 KB) 0005772.patch Administrator Admin, 2007-10-30 14:03

Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Bug #17255: Combined mode doesn't work with type 'group'Closed2007-04-27

Actions
Related to TYPO3 Core - Bug #17394: Child records are displayed multiple times: using patch 5718ClosedChristian Kuhn2007-06-18

Actions
Actions #1

Updated by Franz Holzinger almost 17 years ago

I have applied the patches 5704 and 5718 with trunk.
The irretest example is almost the same as the one from the IRRE doc chapter 'Bidirectional symmetric m:n relations'.
In this example I have created a new parent and 3 child instateneously without any saving in betweegn.
The title fields of the mm intermediate table and the parent table did not get stored.

Actions #2

Updated by Oliver Hader almost 17 years ago

The mentioned error "Attempt to modify record (tablename: 0)..." does only occour if you import an already existing child record, doesn't it?

Actions #3

Updated by Oliver Hader almost 17 years ago

This issue is in some parts related to bug #17255

Actions #4

Updated by Franz Holzinger almost 17 years ago

The "Attempt to modify record (tablename: 0)..." did happen when I have created one parent and saved it. Then created first child with save. Then with the creation of the second child. Then play around with the select box. Then add a third child and click to save. Then this error message again with the latest patches you have provided.

Actions #5

Updated by Oliver Hader almost 17 years ago

Please use "foreign_unique" on using foreign_selector and the combined mode. Also have a look to bug #17255 were the to-do list on the "combined mode" is mentioned.

Actions #6

Updated by Franz Holzinger almost 17 years ago

I have now modified the extension with your suggestions. However now the select box does not get filled any more with the titles of the childs.

I have added also a
'foreign_unique' => 'uid_parent',
on the child TCA for the parent field uid_parent. However the parent is still listed 3 times when it has 3 childs.

Actions #7

Updated by Franz Holzinger almost 17 years ago

I have now copied the page. On the destination the childs are now well listed in the select box.
But after playing around with the select box, some of the childs still appear multiple times. And after a while only the first child remains in the select box.

Actions #8

Updated by Oliver Hader almost 17 years ago

I guess that the children that appear multiple times are from other pages too (selected globally).

Furthermore I guess that the records in the selector that disappeared were used as relation in the context of the parent record. The "foreign_unique" setting should remove used elements from the selector.

Actions #9

Updated by Oliver Hader almost 17 years ago

Is this bug still reproducible with TYPO3 4.1.2?

Actions #10

Updated by Martin Skopal over 16 years ago

I keep running into this problem, getting the following message at exact the same point again and again (1: Attempt to insert record on page '[root-level]' (0) where this table, tx_npstatusinput_component, is not allowed)

I installed the patch from 0005514 and set foreign_unique everywhere i used foreign_select, but it hasn't solved the problem.

The extension works fine exept in one situation, and i cannot find the error there, which displayes the above message. After that, errors keep coming all over the extension, but i relate them to the first.

When i create a new entry in tx_npstatusinput_product, (STATUS-Product) and keep adding Components to this product (entries in _component and _product2component) up to 4, everything is all right, but when adding a fifth component to a product, i keep getting this error.
I checked the TCA now thrice and had the definitions redone, but the error keeps coming up. Maybe i am a complete moron, (i hope not), maybe i have overlooked something in the TCA, but at the moment i am out of any explanation.

I have uploaded the current snapshot of the extension into this Bug.

I use Typo3 4.1.2., PHP 5.2.4 and MySQL 4.1.10.

Actions #11

Updated by Martin Skopal over 16 years ago

I changed the extension which i described above to simple 1:n relations. Now the error comes from time to time when saving data. I can circumvent the problem, but that is beside the point. After saving data, there is no possibility to change this single view any more. I can add new items, but they will disappear after saving, Clearing page cache doesn't solve the problem. If i add an item per hand in the database, it is displayed correctly, but there is no chance i can change anything via the backend view.

Still working with the configuration from above.

Actions #12

Updated by Franz Holzinger over 16 years ago

This bug is still present.
I create a new IRRE price record to a tt_products record. When I save I get the error message

1: Attempt to modify record '' (tt_products_graduated_price:0) without permission. Or non-existing page.

So it tries to use the uid=0 to save the foreign table tt_products_graduated_price. It should have used a new uid with a value instead and not 0.

Actions #13

Updated by Oliver Hader over 16 years ago

Hi Franz,
please attach the extension I should use to test and reproduce the error - if it's in SVN e.g. for tt_products, please tell me the revison/branch/tag I should use.
Furthermore I would be great if you'd give me a step-by-step description so I could reproduce this behaviour faster.
Thanks in advance for that!

Actions #14

Updated by Oliver Hader over 16 years ago

Confirmed

Actions #15

Updated by Oliver Hader over 16 years ago

Please test the attached patch which should solve this bug.

Problem description:
1) The 'useCombination' property in the appearances wasn't evaluated correctly due to a type conflict (integer vs. boolean)
2) The pointer of the selector on the intermediate table was set to '0' for new records but there was only a check against 'NEW...' ids and not against a positive integers standing for a correctly saved child record

Actions #16

Updated by Oliver Hader over 16 years ago

Committed to SVN
  • TYPO3_4-1 (rev. 2669)
  • Trunk (rev. 2670)
Actions

Also available in: Atom PDF