Problem/Motivation

After installing the paragraphs_collection_demo module, the demonstration node that this module creates - "Paragraphs Collection Demo Article!" - cannot be edited and saved. Specifically, trying to "Save and keep published" this node result in the error message:

This value should be of the correct primitive type.

Deleting the "Slider Infinite" paragraph removes this problem.

Proposed resolution

Find out what part of of the Slider plugin or the paragraphs_collection_demo installation causes this problem and fix it.

Remaining tasks

User interface changes

API changes

Data model changes

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

VladimirMarko created an issue. See original summary.

Primsi’s picture

Priority: Normal » Minor

As pointed out elsewhere, this is related to #2220381: "This value should be of the correct primitive type" error when field has no value I don't think that having to edit this node is super critical for us, so setting priority to Minor.

VladimirMarko’s picture

I think the problem are the images used in the "Slider Infinite" paragraph and the function that generates them - \_paragraphs_collection_demo_create_image_paragraph.

Primsi’s picture

Priority: Minor » Normal

Just noticed that because this validation fails, we can't even duplicate/collapse stuff in the widget. We also have the same problem with the more grids demo node. So let's bump that back to Normal for now.

VladimirMarko’s picture

Assigned: Unassigned » VladimirMarko
VladimirMarko’s picture

Status: Active » Needs review
FileSize
682 bytes

This fixes it. The URIs of the images were wrong.

toncic’s picture

Status: Needs review » Needs work
Issue tags: +Needs test

This is already fixed in #2850608: Basic fundamental paragraph types implementation, but we can add some test for that.

VladimirMarko’s picture

Status: Needs work » Needs review
FileSize
1.31 KB

Alright. Scrapped the previous change, as #2850608: Basic fundamental paragraph types implementation handles that and wrote a test of validity for the demo node, instead.

toncic’s picture

Status: Needs review » Needs work

You can also assert ``Paragraphed Content Demo Paragraphs Collection Demo Article! has been updated.`` after saving.

VladimirMarko’s picture

Status: Needs work » Needs review
FileSize
800 bytes
1.41 KB

Here you go.

toncic’s picture

Status: Needs review » Needs work
+++ b/modules/paragraphs_collection_demo/src/Tests/ParagraphsCollectionDemoTest.php
@@ -109,4 +109,22 @@ class ParagraphsCollectionDemoTest extends ParagraphsExperimentalTestBase {
+    $this->assertUrl('node/1');

Don't need for this, after saving you are at that page.

VladimirMarko’s picture

Status: Needs work » Needs review
FileSize
890 bytes
1.38 KB
toncic’s picture

Status: Needs review » Reviewed & tested by the community

Now looks fine.

  • Primsi committed bc03439 on 8.x-1.x authored by VladimirMarko
    Issue #2858719 by VladimirMarko, toncic: "Paragraphs Collection Demo...
Primsi’s picture

Status: Reviewed & tested by the community » Fixed

Committed, thanks.

Status: Fixed » Closed (fixed)

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

apaderno’s picture

Issue tags: -Needs test +Needs tests