See related issue

I've got 8.x-1.0-alpha15 installed

I've applied this patch cleanly with composer but I still get this error:

Got error 'PHP message: Uncaught PHP Exception InvalidArgumentException: "Field field_domain_all_affiliates is unknown." at /var/www/docroot/core/lib/Drupal/Core/Entity/ContentEntityBase.php line 58

This is not fixed

further information:

I updated drupal/menu_item_extras and this error started to happen so unsure if its related to this module being updated.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

darrenwh created an issue. See original summary.

darrenwh’s picture

Issue summary: View changes
agentrickard’s picture

Priority: Critical » Normal
Status: Active » Postponed (maintainer needs more info)

What patch?

darrenwh’s picture

Status: Postponed (maintainer needs more info) » Active

@agentrickard The one in the related ticket?

agentrickard’s picture

Well, someone uploaded a new patch on a closed ticket, so I don't know what you are referencing. Please use URLs to the actual comment and patch.

The original patch was already committed.

What I really need is some context for when this error occurs.

* What page were you on? (Or what drush command did you run?)
* What were you trying to do?

I can't do anything with just an error output.

agentrickard’s picture

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

Status: Postponed (maintainer needs more info) » Closed (works as designed)

Solved this, The domain field was missing from the menu extras field, adding it back resolved the issue

agentrickard’s picture

agentrickard’s picture

Status: Closed (works as designed) » Active

I'm a little fascinated to know where the error was occurring, though.

What did you do to trigger the error?

davps’s picture

Status: Active » Needs review
FileSize
5.28 KB
5.98 KB

Faced with the same exception at create and update operations for the node/user entities with deleted domain access fields.

Here is the patches with detailed tests methods and fix.
P.S. I don't like the method names in the test, feel free to rename them all.

P.P.S. Looks like fix was suggested before #3036555-13: Field field_domain_all_affiliates is unknown and missed :(

agentrickard’s picture

Status: Needs review » Postponed (maintainer needs more info)

"Missed" because it is not helpful to upload patches to closed issues without reopening them.

I also never got any context for this issue. Your patch seems to only affect Devel Generate when then domain fields have been deliberately deleted.

Is this correct?

I cannot properly review work unless proper context is provided.

davps’s picture

Your patch seems to only affect Devel Generate when then domain fields have been deliberately deleted. Is this correct?

Yes, it is. This behavior could be achieved with deleting domain access fields from the node bundle.
I can move these patches to the separate issue, if it make sense.

agentrickard’s picture

My question, of course, is "why would anyone delete these fields and expect the module to work?"

This issue is fine.

  • agentrickard committed a84407c on 8.x-1.x authored by davps
    Issue #3067230 by davps: Edit Field field_domain_all_affiliates is...
agentrickard’s picture

Status: Postponed (maintainer needs more info) » Fixed

Committed! Thank you.

agentrickard’s picture

agentrickard’s picture

Status: Fixed » Closed (fixed)

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