config error

I'm encountering a configuration error when trying to switch from included PB to excluded PB.

The required validation is running before the the paragraph bundles are added. (see screenshot).

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Tom Robert created an issue. See original summary.

itamair’s picture

I tried to reproduce your issues (on the last dev) but I couldn't ...
May you update with the last dev and verify it still happens to you, to confirm might be a general issue, and not just yours one.
This is working nice for me ...

itamair’s picture

Status: Active » Postponed (maintainer needs more info)
s-jack’s picture

After installing the 8.x-1.0-alpha1, I created a new content type for testing and created an Entity Reference with Layout field type.
Even if I select some paragraph types, the Layout paragraph type is not displayed at all.

JLeMosy’s picture

I get the same error message with 8.x-1.0-alpha2 when trying to re-use an existing ERL field on an additional content type.

7thkey’s picture

I have the same problem when adding an existing ERL field into another type of node.

BramDriesen’s picture

Status: Postponed (maintainer needs more info) » Active

Bump

BramDriesen’s picture

The gif might be outdated, but the issue is still present when you try to save the form. The negate option seems to break with the AJAX callback.

BramDriesen’s picture

Status: Active » Needs review
FileSize
1.94 KB

The issue seems to be that when AJAX is processing the form, the $this->getSettings() goes to the database instead of looking at the form_state values. Not sure if this patch is any good though... it seems to fix the issue.

Setting to needs review so others can test.

BramDriesen’s picture

FileSize
1.94 KB
1.06 KB

Fixed a small mistake

justin2pin’s picture

Thanks @BramDriesen!

I don't think we need to check $form_state if a value is set since the FAPI should do that already. I think the problem happens when we set the default value to an option that no longer exists, when going from "Include.." to "Exclude..".

I uploaded a somewhat simpler patch (with some ugly "ifs" though) that doesn't call form_state directly again. Let me know what you think!

BramDriesen’s picture

I'll test this on Monday and let you know how it goes :-) thanks for your response!

BramDriesen’s picture

Status: Needs review » Reviewed & tested by the community

Sorry for the delay. Your patch also fixed the issue.

Agreed the ifs are a bit ugly, but can be cleaned up in a later stage I guess.

RTBC!!

justin2pin’s picture

Status: Reviewed & tested by the community » Fixed

Looks like this has been fixed in dev for a while but I never flagged the issue as fixed. Doing that now, thanks.

Status: Fixed » Closed (fixed)

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