Just upgraded from rc1 to rc2.
At "Entity selection mode" I'm checking "Views: Filter by an entity reference view". This results in an Ajax HTTP 500 and:
PHP Fatal error: Class EntityReference_SelectionHandler_Views contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (EntityReference_SelectionHandler::validateAutocompleteInput) in /public_html/sites/all/modules/contrib/entityreference/plugins/selection/EntityReference_SelectionHandler_Views.class.php on line 150, referer: http://example.com/admin/structure/types/manage/issue/fields/field_issue...
(Using PHP 5.2.10)
Comment | File | Size | Author |
---|---|---|---|
#43 | EntityReference_SelectionHandler_Generic.class_.json_.zip | 4.84 KB | haqinai |
#22 | Patch.jpg | 137.84 KB | lilbebel |
#6 | 1608358-selectionhandler-views-broken.patch | 736 bytes | Damien Tournoud |
Comments
Comment #1
igor.ro CreditAttribution: igor.ro commentedsubscribe
Comment #1.0
igor.ro CreditAttribution: igor.ro commentedadded version info
Comment #2
GPeach CreditAttribution: GPeach commentedI also got this error when upgrading from rc1 to rc2.
I don't have the calendar or date modules installed and could not clear the cache without getting the error. Dropping back to rc1 and clearing caches fixed the problem for me... Thanks
Comment #3
Tara1981 CreditAttribution: Tara1981 commentedThis is the error I have. I wasn't sure if it was because I just installed entity references dialog module.
Fatal error: Class EntityReference_SelectionHandler_Views contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (EntityReference_SelectionHandler::validateAutocompleteInput) in public_html/sites/all/modules/entityreference/plugins/selection/EntityReference_SelectionHandler_Views.class.php on line 150
Page execution time was 209.16 ms. Memory used at: devel_boot()=4.83 MB, devel_shutdown()=39.09 MB, PHP peak=39.25 MB.
Any help appreciated.
Comment #4
stockliasteroid CreditAttribution: stockliasteroid commentedGetting the same thing here... The problem is that the base class declares an abstract method validateAutocompleteInput that all sub-classes are required to implement, but the views handler doesn't use autocomplete and thus doesn't implement it. Seems like the abstract method should be removed from the base class if not all selection handlers will implement it.
Comment #5
ParisLiakos CreditAttribution: ParisLiakos commentedsame here, promoting to critical
Comment #6
Damien Tournoud CreditAttribution: Damien Tournoud commentedTwo critical errors in the same release => we don't have enough tests (or tests at all for the Views integration).
This should fix it. Ideally we should have a base abstract class that implement a sane default behavior.
Comment #7
ParisLiakos CreditAttribution: ParisLiakos commentedyes, that gets rid of the fatal error
Comment #8
MurzAlso got this issue, patch from #6 solves the problem, thanks!
Comment #9
garrettc CreditAttribution: garrettc commentedPatch from #6 fixed this issue for me.
Comment #10
Tara1981 CreditAttribution: Tara1981 commentedI installed 7.x-1.0-rc3 and still get this error. Will the patch work for rc3 too? (I am a rank amateur, so apologies if this is an obvious question).
Comment #11
garrettc CreditAttribution: garrettc commentedSorry Tara1981, I forgot to clarify that I applied the patch to rc3 and it was fine.
Comment #12
Tara1981 CreditAttribution: Tara1981 commentedThanks - I just wanted to check before attempting my first patch!
Comment #13
szt CreditAttribution: szt commentedYes-yes, it works!
Comment #14
lilbebel CreditAttribution: lilbebel commentedSorry but where do I put this patch? Which file and line?
Thanks,
M
Comment #15
szt CreditAttribution: szt commentedOpen the patch file at #6 and you will see the infos you need.
(Insert the "+" signed lines to "plugins/selection/EntityReference_SelectionHandler_Views.class.php" at line 134)
More info: Applying a patch manually
Comment #16
baby.hack CreditAttribution: baby.hack commentedApplied #6 manually to both rc2 and later to rc3. Solved the issue for both.
Comment #17
lilbebel CreditAttribution: lilbebel commentedThank you.
Comment #18
Alan D. CreditAttribution: Alan D. commentedFollowing up on fatal errors, EntityReferenceHandler_base is not referenced in the info file, so this kills other modules that are extending that class.
And doing this search, "class \w* (implements|extends) \w* \{" shows 14 files contain class definitions, yet the info file only mentions 7.
Comment #19
Alan D. CreditAttribution: Alan D. commentedMmm... it requires a full code replace cf. extract over, and fatal errors are unrelated due to dependency that uses a class that no longer exists in the module :(
If CTools stores class instances in the session / cache / etc, it would always pay to reference all classes still in the info file:
files[] = plugins/selection/EntityReference_SelectionHandler_Views.class.php
files[] = plugins/selection/EntityReference_SelectionHandler_Generic.class.php
files[] = plugins/behavior/EntityReferenceBehavior_ViewsFilterSelect.class.php
Comment #20
Tara1981 CreditAttribution: Tara1981 commentedI am struggling with this patch business and it looks like this isn't totally resolved? I think I'll leave it for now.
I'm subscribing to this thread.
Comment #21
Abilnet CreditAttribution: Abilnet commented<newbie warning>
I tried to test-apply the patch in #6 but don't get it work. What I'm doing wrong? Some handholding appreciated!
Here's what I did and the results:
</newbie warning>
Comment #22
lilbebel CreditAttribution: lilbebel commentedHi Albilnet,
Open up your file "plugins/selection/EntityReference_SelectionHandler_Views.class.php" with a code editor. Look at the screen shot I have attached for exactly what to add and where to add it. Make sure to remove the little + signs on the patch as they are indicators of placement and not part of the code.
Good luck.
Comment #23
Abilnet CreditAttribution: Abilnet commentedBy using the detailed instruction by lilbebel I managed to install the patch - the error went away!
Thank you so much lilbebel, your help greatly appreciated. Your kind of helpful people actually make Drupal community! I love Open Source!
Comment #24
NowThatsCookin.Com CreditAttribution: NowThatsCookin.Com commentedDamien Tournoud and lilbebel I want to say thank you very much for your patch and instructions, I applied the patch and with the screen shot that helped me figure out where to put it easily.
This patch solved the problem for me.
I "updated" my Drupal install to 7.14 yesterday morning, and it broke my whole site. Finally got it rolled back, but then weird stuff started happening. Such as the right side navigation in I.E. would shift to the bottom of the content, and this error syntax would show up in light gray letters in the background of my site.
I found that switching to compatibility mode on I.E. solved the first issue, and this patch solved the later issue.
So again, thank you for taking the time to figure this out and post the solution up here for those of us that just do not have the understanding to be able to do so. It helped a TON!!!!
Frank
Comment #25
Pisco CreditAttribution: Pisco commented+1 Would love to see this patch being committed soon.
Comment #26
attiks CreditAttribution: attiks commentedPatch applies and solves the problem
Comment #27
yvmarques CreditAttribution: yvmarques commentedWorks well for me, thanks for the patch !
Comment #28
netw3rker CreditAttribution: netw3rker commentedpatch solved this for us too. I'd say this is worth committing now
Comment #29
Damien Tournoud CreditAttribution: Damien Tournoud commentedI actually merged this in 7.x-1.x a couple of days ago.
Comment #30
Sridharan-1 CreditAttribution: Sridharan-1 commentedI dont have any file "EntityReference_SelectionHandler_Views.class.php"... Please help
Comment #31
szt CreditAttribution: szt commentedMaybe you have the earlier RC1 version?
This issue for RC3...
Comment #32
viseser CreditAttribution: viseser commentedPatch applies and solves the problem for Entity reference 7.x-1.0-rc3. Thanks :)
Comment #33
mariagwyn CreditAttribution: mariagwyn commentedConfirmed that patch works. THX.
Comment #34
protoplasm CreditAttribution: protoplasm commentedpatch #6 worked, thnx
Comment #35
ParisLiakos CreditAttribution: ParisLiakos commentedmaybe a new version should be released that includes this patch?
closed as duplicates:
#1653660: Ajax http error
#1635156: Entity Selection Mode with Views is broken
Comment #36
joelrotelli CreditAttribution: joelrotelli commented#6 works for me too, thanks
Comment #37
netw3rker CreditAttribution: netw3rker commentedbumping this to RTBC instead of 'fixed'
Comment #38
szt CreditAttribution: szt commentedNo, it's fixed, as mentioned at #29.
You can find in the dev version.
Comment #39
dustinrwh CreditAttribution: dustinrwh commented#6 works for me as well. Thanks!
Comment #40
Sknight17 CreditAttribution: Sknight17 commentedThe patch in #6 does the trick.
szt, this issue is for 7.x-1.0-r3c which is still the 'stable' version. Since this bug is considered 'critical' by most it should not be labeled as fixed until the patch is applied to 7.x-1.0-r3c or until 7.x-1.x becomes stable.
Comment #41
ParisLiakos CreditAttribution: ParisLiakos commentedOne more duplicate: #1666320: Entity Reference - Entity Selection Mode Views Error - Contexual Filter Failure
Yeah, well critical bugs are not nice to have in a stable version, but this issue, is fixed..
Open a new issue: task with title: Release new version..
no point keeping this issue alive
EDIT
Issue opened here #1672618: Release a new version
Comment #42
mamanerd CreditAttribution: mamanerd commentedPatch from #6 worked for me too on rc3. Thanks!
Comment #43
haqinai CreditAttribution: haqinai commentedI have tried #6 and have come up with some more issues. I may have not followed the instructions just right but I will show you what I have done to see if you all can help me to fix the problem.
If you go to the site you will see the error===> http://edah.ca/hubtool/
now in the code what I did is this:
Please let me know your thoughts.
Cheers,
Jacob Melnick
Comment #44
haqinai CreditAttribution: haqinai commentedI am some what new to Drupal. I have been working with it for Three years now. If you need more information let me know.
Comment #45
mamanerd CreditAttribution: mamanerd commentedWhich page is your error on? I don't see any on the link you provided.
Comment #46
haqinai CreditAttribution: haqinai commentedtry this link: http://edah.ca/hubtool/?q=forum
Comment #47
haqinai CreditAttribution: haqinai commentedSCREEN SHOT Also note the screen shot
Comment #48
mamanerd CreditAttribution: mamanerd commentedLooks like you're declaring the function below twice, once on line 138, once on line 193. You can only declare it once.
public function validateAutocompleteInput($input, &$element, &$form_state, $form)
Comment #49
haqinai CreditAttribution: haqinai commentedI think that we are getting closer. I now have this error:
Fatal error: Class EntityReference_SelectionHandler_Views contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (EntityReference_SelectionHandler::validateAutocompleteInput) in /home/edah/public_html/hubtool/sites/all/modules/entityreference/plugins/selection/EntityReference_SelectionHandler_Views.class.php on line 150
Comment #50
Mile23Not sure why this is marked fixed. I see this error.
@mamanerd:
You can see the AJAX error when you select one of the items in Entity Selection Mode.
You can see the PHP error by checking your server's PHP log:
PHP Fatal error: Class EntityReference_SelectionHandler_Views contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (EntityReference_SelectionHandler::validateAutocompleteInput) in PATH/drupal/sites/all/modules/entityreference/plugins/selection/EntityReference_SelectionHandler_Views.class.php on line 150
Comment #51
hbalagtas CreditAttribution: hbalagtas commentedI'm also still getting this error on a Drupal 7 + commerce setup, this error comes up on the log and the node reference autocomplete has stopped working, not really sure if the two are related.
PHP Fatal error: Class EntityReference_SelectionHandler_Views contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (EntityReference_SelectionHandler::validateAutocompleteInput) in /var/www/drupal/sites/all/modules/contrib/entityreference/plugins/selection/EntityReference_SelectionHandler_Views.class.php on line 150, referer:
Comment #52
ParisLiakos CreditAttribution: ParisLiakos commented@Mile23 and @hbalagtas download the latest development version.
also see issue here:
#1672618: Release a new version
Comment #53
Mile23Thanks, rootatwc.
Comment #54
hbalagtas CreditAttribution: hbalagtas commentedThanks @rootatwc but I do have the rc3 installed, when I run cron I'm still getting an error.
$drush dl entityreference --select --all
Choose one of the available releases for entityreference:
[0] : Cancel
[1] : 7.x-1.x-dev - 2012-Jun-18 - Development
[2] : 7.x-1.0-rc3 - 2012-May-30 - Supported, Installed, Recommended
[3] : 7.x-1.0-rc2 - 2012-May-30 -
[4] : 7.x-1.0-rc1 - 2012-Mar-20 -
[5] : 7.x-1.0-beta5 - 2012-Feb-26 -
$ drush cron
PHP Fatal error: Class EntityReference_SelectionHandler_Views contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (EntityReference_SelectionHandler::validateAutocompleteInput) in /var/www/drupal/sites/all/modules/contrib/entityreference/plugins/selection/EntityReference_SelectionHandler_Views.class.php on line 150
Drush command terminated abnormally due to an unrecoverable error. [error]
Error: Class EntityReference_SelectionHandler_Views contains 1
abstract method and must therefore be declared abstract or implement
the remaining methods
(EntityReference_SelectionHandler::validateAutocompleteInput) in
/var/www/drupal/sites/all/modules/contrib/entityreference/plugins/selection/EntityReference_SelectionHandler_Views.class.php,
line 150
Comment #55
hbalagtas CreditAttribution: hbalagtas commented@rootawc, misunderstood what you meant, when I clicked the link I thought you wanted us to install rc3, installing 7.x-1.x-dev did remove the error and my autocomplete text boxes are working again.
Comment #56
bstoppel CreditAttribution: bstoppel commentedI too was getting this error when running "drush cc all" and other times with rc3. The June 18th dev version does fix this problem.
Comment #57
vparfaniuc CreditAttribution: vparfaniuc commentedPatch from #6 worked just great for me. Thanks Damien.
Comment #58
elBradford CreditAttribution: elBradford commentedI confirm the most recent dev (June 18 2012) fixes the issue for me as well.
Comment #59
TheBarnacle CreditAttribution: TheBarnacle commentedThanks for this! Good fix.
Comment #60
j0rd CreditAttribution: j0rd commentedSame error.
Here's are the two patches which would update you to most recent -dev on June 18th if you're interested.
#1625188: Autocomplete widget failed to return any nodes for reference
http://drupalcode.org/project/entityreference.git/blobdiff/58dc93cff4a77...
#1608358: PHP Fatal error: Class EntityReference_SelectionHandler_Views
http://drupalcode.org/project/entityreference.git/blobdiff/cf8766ecb0b6c...
Ideally we'd have a new stable released with these patches.
Comment #62
Piyushagr CreditAttribution: Piyushagr commentedi have same error
Fatal error: Class EntityReference_SelectionHandler_Views contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (EntityReference_SelectionHandler::validateAutocompleteInput) in /home/mrater/public_html/sites/all/modules/contrib/entityreference/plugins/selection/EntityReference_SelectionHandler_Views.class.php on line 150
Comment #63
yannickooJust use the dev version, it works fine.
Comment #64
Mile23See: #1672618: Release a new version
Comment #65
jday CreditAttribution: jday commenteddev version fixed the error for me too.
Comment #66
selinav CreditAttribution: selinav commentedI have the RC3 version and I have still the problem
Fatal error: Class EntityReference_SelectionHandler_Views contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (EntityReference_SelectionHandler::validateAutocompleteInput) in /.../sites/all/modules/entityreference/plugins/selection/EntityReference_SelectionHandler_Views.class.php on line 150
Comment #67
mgiffordYa, RC3 is from May. It's definitely time for a new release.
Note, upgrading to the dev version & running update db still didn't help for me.
Not sure if it's with Entity Reference or Migrate UI because when I disabled Migrate UI it all seemed to work fine.
Comment #68
marsdk CreditAttribution: marsdk commentedMore info can be found here on why we haven't seen a new version yet : http://drupal.org/node/1672618#comment-6457046
Comment #69
mgiffordThat is wonderful news for sure. I do hope Damien takes time with his family (and away from the screen). However, he's not the only maintainer. Though not sure how it works between him and @Amitaibu.
We might just have to wait.....
Comment #70
dhallennem CreditAttribution: dhallennem commentedpatch #6 = solution !
Comment #71
Finn Lewis CreditAttribution: Finn Lewis commentedCurrent dev version works for me.
Comment #71.0
Finn Lewis CreditAttribution: Finn Lewis commentedadded PHP version