This warning message appears: The reference view entity_reference_messages cannot be found.

entity_reference_messages is referenced twice but the file does not exist.

grep -in entity_reference_messages -d recurse profiles
profiles/contrib/social/modules/social_features/social_activity/config/install/field.field.activity.activity.field_activity_message.yml:22: view_name: entity_reference_messages
profiles/contrib/social/modules/custom/activity_creator/config/install/field.field.activity.activity.field_activity_message.yml:22: view_name: entity_reference_messages

Comments

SocialNicheGuru created an issue. See original summary.

jaapjan’s picture

Status: Active » Postponed (maintainer needs more info)

What would be the steps to reproduce this and when do you get this warning message?

socialnicheguru’s picture

I am getting this on every page. Thw reference is in the lines in question.

I searched my codebase and did not find a corresponding view file.

Could you check yours to see if the file exists?

socialnicheguru’s picture

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

I can't find the file as well. I'm not sure for what it is used and how big of an issue it is for our notification system. I know that it was there 3 years ago, but after that I can't find it anymore. Cannot find an issue where it is removed as well...

Perhaps only when you create activities via the interface, not programmatically?

socialnicheguru’s picture

it was removed here: https://gitlab.uncinc.nl/pub/open_social/commit/d087e9174f4a58829d9c7f36...

What view should be used instead?

jaapjan’s picture

I think we should be able to remove that code safely. i don't know why you get this errors on every page.

Could you try to remove those lines from the views and do a drush feature-import afterwards. I'm wondering if this make the warning message disappear. If it does we should remove those lines from the files.

jaapjan’s picture

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

I'm having this issue too. I tried commenting the lines where the view gets called:

#settings:
# handler: views
# handler_settings:
# view:
# view_name: entity_reference_messages
# display_name: entity_reference_1
# arguments: { }
field_type: entity_reference

at social_activity/config/install/field.field.activity.activity.field_activity_message.yml
and then doing a drush features-import but it didn't worked. I also tried in the UI, just selecting that difference in code but didn't worked also.

i just downloaded Social 8.7.0 but i see those lines still there in the file and by going to the view:
admin/structure/views/view/activity_stream/edit/page_activity_stream
on a fresh Social install, you can see that the view is disabled and in the filter criteria there is a "Broken/missing handler" probably referencing that view.

The message of the issue ("The reference view entity_reference_messages cannot be found.") doesn't show on the front of the vanilla site, so maybe it starts to appear after creating a new content type or a new type of group or a new section.

Unfortunatelly I can't upgrade my site from 8.x-6.4 to 8.7.0 to see if this still an issue because the module social_post has lowered the version number from 8601 to 8000. I'm not sure what to try next so any help is appreciatted.

UPDATE:
I edited the file social_post.install in the social_post module te re-add the update:
/**
* Grant permission to administer post entities to CM and SM.
*/
function social_post_update_8601() {
user_role_grant_permissions('contentmanager', ['administer post entities']);
user_role_grant_permissions('sitemanager', ['administer post entities']);
}

And now I could upgrade to 8.7.0.
What lines should be removed in activity files? I tried removing just "view_name: entity_reference_messages" but message is still there.

tbsiqueira’s picture

Status: Active » Closed (outdated)

Closing issue as outdated, please feel free to reopen if still relevant