Open robertgarrigos opened 2 months ago
What do you mean by "overwriting"? Overriding?
Can you add more specific steps to reproduce? I believe you have Entity Plus enabled (which is not required for this module).
I do see some issues in profile.info.inc
which is only used when E+ is enabled. For starters, it has the wrong callbacks: entity_property_verbatim_set
and entity_property_getter_method
, which don't exist. In Backdrop's Entity Plus, those should be entity_plus_property_verbatim_set
and entity_plus_property_getter_method
. So perhaps this is in part producing this problem (though I doubt it).
I see another issue, which may also be causing this problem: profile_entity_info()
defines a 'label callback' => 'entity_class_label'
, which doesn't exist in Backdrop. It should probably be 'entity_label'
.
If you want to try patching your site with those and seeing if that helps, that'd be helpful to pinpoint the problem.
Yes, overriding I meant. I need Entity Plus for some other module. Thanks, @argiepiano, those changes didn't fix the problem. Steps are easy, just create a profile and try to override profile.tpl.php file within your theme. Accessing the profile page triggers the error.
Did you try clearing caches after the changes? If so, OK, that means that more debugging is needed.
yep, cache was cleared.
Commenting the function profile_entity_info_alter(&$entity_info) in profile.module fixes the error. I have been doing actions on profiles with no problem. Is that hook_entity_info_alter() function used at all?
Yes, it defines metadata for all of profile properties. You won't be able to use entity_metadata_wrapper with profile entities now. But this also points at the fact that the error is there. Most likely an inexistent callback, like I said above. You probably missed some of those.
To find the culprit, you should look at ALL callbacks specified there (as in setter callback
, getter callback
and others) and check that the callback function actually exists.
Actually, what I just sald above is wrong. profile_entity_info_alter()
does not provide metadata. It actually tells your site to use the controller provided by Entity Plus.
So, commenting that out will avoid using E+ entity controller for Profiles in your site. This is an acceptable solution in your case. But the bug needs to be found, since it still exists.
I'm lost with this bug.
If I had the time I'd try to reproduce ... not right now unfortunately.
Overwriting profile.tpl.php triggers an error:
I found the same kind of error with paragraphs (https://github.com/backdrop-contrib/paragraphs/issues/91) which has been fixed.