Comments

dagmar’s picture

Status: Active » Needs review
StatusFileSize
new1.24 KB

Untested patch.

dagmar’s picture

Assigned: Unassigned » dagmar
Status: Needs review » Needs work

Now I remember, wysiwyg doens't use ctools for export/import. I'm going to work on this integration.

dagmar’s picture

Status: Needs work » Needs review
StatusFileSize
new3.11 KB

Ok, this implement the basic functionality.

lucascaro’s picture

Status: Needs review » Needs work

Exporting looks right, importing gives the following error:

PDOException: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'format' cannot be null: INSERT INTO {wysiwyg} (format, editor, settings) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2); Array ( [:db_insert_placeholder_0] => [:db_insert_placeholder_1] => [:db_insert_placeholder_2] => N; ) in Drupal\configuration\Config\WysiwygConfiguration->saveToActiveStore() (line 75 of /var/www/sites/helior/public_html/sites/preview-site/modules/contrib/configuration/lib/Drupal/configuration/Config/WysiwygConfiguration.php).

dagmar’s picture

Status: Needs work » Needs review
StatusFileSize
new592 bytes
new3.15 KB

I see. Please try this.

lucascaro’s picture

StatusFileSize
new853 bytes

I got the same error even after re exporting. Attached is the exported file so you can test.

lucascaro’s picture

Status: Needs review » Needs work
dagmar’s picture

Status: Needs work » Needs review
StatusFileSize
new908 bytes
new3.52 KB

Right, we need also to include text formats a dependency of the wysiwyg.

Now if you export a content type, it will also export the Text Format. There is another issue that will include the wysiwyg twice, see #1807968: Configurations are duplicated when exported childrens

lucascaro’s picture

Status: Needs review » Needs work
StatusFileSize
new1.23 KB

The new file is still failing to import:

dagmar’s picture

Status: Needs work » Needs review
StatusFileSize
new3.8 KB

Ok, the issue here seems to be related to wysiwyg profiles that doens't have editors defined.

This patch provides a 'default' profile when $data = FALSE; and use the identifier of the wysiwyg to get the format instead of use the saved in the profile.

lucascaro’s picture

Status: Needs review » Needs work
StatusFileSize
new956 bytes

Attached the generated file:

PDOException: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'editor' cannot be null: UPDATE {wysiwyg} SET format=:db_update_placeholder_0, editor=:db_update_placeholder_1, settings=:db_update_placeholder_2 WHERE ( (format = :db_condition_placeholder_0) ); Array ( [:db_update_placeholder_0] => plain_text [:db_update_placeholder_1] => [:db_update_placeholder_2] => N; [:db_condition_placeholder_0] => plain_text ) in Drupal\configuration\Config\WysiwygConfiguration->saveToActiveStore() (line 98 of /var/www/sites/helior/public_html/sites/preview-site/modules/contrib/configuration/lib/Drupal/configuration/Config/WysiwygConfiguration.php).

dagmar’s picture

Status: Needs work » Needs review
StatusFileSize
new613 bytes
new3.8 KB

Sorry

lucascaro’s picture

Status: Needs review » Needs work
StatusFileSize
new1.29 KB

new file to check why the settings get removed:

dagmar’s picture

Status: Needs work » Needs review
StatusFileSize
new627 bytes
new3.8 KB

I think I found the problem.

lucascaro’s picture

Status: Needs review » Reviewed & tested by the community

thanks!

dagmar’s picture

Status: Reviewed & tested by the community » Fixed

Committed 033218d

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Anonymous’s picture

Issue summary: View changes

Updated issue summary.