Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Container not changed if copy/paste a CE element #6

Closed
farconada opened this issue Dec 9, 2012 · 5 comments
Closed

Container not changed if copy/paste a CE element #6

farconada opened this issue Dec 9, 2012 · 5 comments

Comments

@farconada
Copy link

http://www.youtube.com/watch?v=WbcNYE5mx2c&feature=youtu.be
If you copy a CE and paste it in another container then the CE is inserted in the original container

@NamelessCoder
Copy link
Member

This one must be solved by catching the case of copy/move/reference when not relative to a current content element. TYPO3 will use values such as 542x1 for page UID 542 colPos 1 - this must be parsed by the ConfigurationProvider's methods that are executed when content is moved/copied.

cmd[tt_content][950][copy]=169x1

Is an example argument structure.

@farconada
Copy link
Author

In the testing website (the one that you have admin access).
Try it:

  • go page id = 29
  • copy CE uid = 60
  • go page id = 14
  • paste inside
    Then:
  • nested content inside the copied element in page 14 isnt copied
  • if you go back to page 29 and look at element uid=60 then it is modified

It is a real problem cause if you copy/paste elements and your original ones get modified then you could screw up you site

@farconada
Copy link
Author

seems a litle db script fix the problem
$query = "SELECT * FROM tt_content where tx_flux_column like '%:%'";
$result = mysql_query($query) or die('Consulta fallida: ' . mysql_error());

while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) {
$columnArray = explode(':', $line['tx_flux_column']);
$query = "update tt_content set tx_flux_column = '".$columnArray[0]."' where uid =" . $line['uid'];
mysql_query($query);
}

@NamelessCoder
Copy link
Member

Thanks for the snippet - just one comment: you should also set the tx_flux_parent field to the UID part of the old value - i.e. $columnArray[1]. I assume this field was set correctly on your installation but there could be some older installations there the field has a NULL value and this will cause problems if not also updated.

@NamelessCoder
Copy link
Member

Closing the issue. Thanks again for sharing your solution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants