contentacms / contenta_jsonapi

Contenta CMS, the decoupled Drupal
http://www.contentacms.org/
GNU General Public License v2.0
328 stars 104 forks source link

Local tasks missing on node types apart from page. #386

Closed BrianGilbert closed 4 months ago

BrianGilbert commented 4 years ago

I've tracked this down to the following https://github.com/contentacms/contenta_jsonapi/blob/8.x-3.x/modules/contenta_enhancements/contenta_enhancements.module#L368

If I change 'page' to one of the affected node types, then that node type displays local tasks correctly

BrianGilbert commented 4 years ago

Changing line 368 to the following resolves the issue for me, but I am unsure what the if statement was doing and if this will cause other issues?

  if ($entity->entityTypeId != 'node') {
ajitdev commented 4 years ago

Thank you for reporting the issue and for the pull request. However, this fix provided now directly bypasses the contenta_enhancements_node_view_alter function completely. And the jsonapi output on the node is not displayed at all, which doesn't seem right. I might have mistaken otherwise. Please correct me if that is the case.