When adding a ShareThis Link field to a view, we're getting the following error:

The handler for this item is broken or missing. The following details are available:
Enabling the appropriate module will may solve this issue. Otherwise, check to see if there is a module update available.

On the backend, we're seeing this trace:

PHP Fatal error: Unsupported operand types in core/modules/views/src/Plugin/views/field/FieldPluginBase.php on line 1168

Not sure what to make of this. We've tried uninstalling and re-installing the module. Steps to reproduce:

  1. Install ShareThis module
  2. Configure a View with a "Fields" display
  3. Add ShareThis link field

After which the above error displays, and "Broken/missing handler" is the field listed. View fails to render and returns HTTP code 500.

Proposed commit message :

git commit -m 'Issue #2659250 by heddn, naveenvalecha, Corregidor, edysmp: Cannot add ShareThis field to View' --author="lucashedding <lucashedding@1463982.no-reply.drupal.org>"

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

CacheHit created an issue. See original summary.

Corregidor’s picture

Issue summary: View changes
naveenvalecha’s picture

Corregidor’s picture

FWIW, we can only reproduce this issue on Drupal instances running on a remote host but not when the instance runs locally. Very strange. The services and code bases are identical on both machines, and yet adding this field only fails on the remote instance. We also see an AJAX error on the browser console when this fails, but this is likely just a symptom of the issue.

Corregidor’s picture

Confirmed issue also affects 8.x-dev.

naveenvalecha’s picture

Version: 8.x-2.0-beta1 » 8.x-2.x-dev
TanvirAhmad’s picture

Subscribing.

heddn’s picture

Hmm, this would explain why it works locally in #4 and not on server. Local must be a filesystem that doesn't care about case sensitivity of folder names.

Status: Needs review » Needs work

The last submitted patch, 8: sharethis-cannot_add_sharethis_views-2659250-8.patch, failed testing.

naveenvalecha’s picture

Issue tags: +Needs tests

Thanks for the patch.

rename from src/Plugin/Views/field/SharethisNode.php
rename to src/Plugin/views/Views/field/SharethisNode.php

nit views two times. it should be "views"

heddn’s picture

Re: #10:
That isn't a nit. It is an important thing. Making the adjustment.

heddn’s picture

Status: Needs work » Needs review

And it seems like there are/were tests. Since it failed with the wrong name. Maybe we want something more?

naveenvalecha’s picture

Assigned: Unassigned » neetu morwani

looking good to me.
+1 for RTBC. Assigning to neetu-morwani to get this committed into 8.x-2.x

heddn’s picture

Can this get committed, it is making it hard to apply other patches without re-rolls since it renames a file. Specifically, #2755679: Sharethis no share nodes..

naveenvalecha’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: -Needs tests

doing RTBC as per #13.
Will do my hands dirty and commit it.

  • naveenvalecha committed ace5611 on 8.x-2.x authored by heddn
    Issue #2659250 by heddn, Corregidor, naveenvalecha: Cannot add ShareThis...
naveenvalecha’s picture

Assigned: neetu morwani » Unassigned
Status: Reviewed & tested by the community » Fixed

Thanks!
It will now unblocks you there.

edysmp’s picture

@naveenvalecha No removed src/Plugin/Views/field/SharethisNode.php? is duplicate.

naveenvalecha’s picture

@edysmp

is duplicate.

No.

Have you done the git pull?
Check by downloading the development tarball from project page.

edysmp’s picture

naveenvalecha’s picture

Issue summary: View changes

#20 Nice find. yup I'm using .Setup linux in VM. On fixing it.

naveenvalecha’s picture

Issue summary: View changes

updating commit message.

  • naveenvalecha committed 951f035 on 8.x-2.x
    Revert "Issue #2659250 by heddn, Corregidor, naveenvalecha: Cannot add...
  • naveenvalecha committed bebc39d on 8.x-2.x authored by heddn
    Issue #2659250 by heddn, naveenvalecha, Corregidor, edysmp: Cannot add...

Status: Fixed » Closed (fixed)

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