Strict warning: Declaration of votingapi_views_handler_field_value::element_type() should be compatible with that of views_handler_field::element_type() in require_once() (line 9 of sites\all\modules\votingapi\views\votingapi_views_handler_field_value.inc).

CommentFileSizeAuthor
#26 votingapi_strict_warning-1110134-26.patch548 bytesjaydub

Comments

Leeteq’s picture

Subscribing.

helloworld2016’s picture

Hello,

Sorry but I didn't understand your comment :). What do you mean by "subscribing"?

Leeteq’s picture

@bizzz12345: hello, welcome to the community :-)
When a person want to "watch" and be automatically informed about developments in a certain "issue", we need to post "something" so that we are "subscribed" to it. After that, it will pop up in the activity list on the user dashboard whenever someone is updating it with new comments, or changing its status, etc. So if we have nothing in particular to "say" or comment on, we just type "Subscribe" or the like. Some combine that by typing "+1" to show that they are in favor of whatever is the main suggestion. Many "+1" comments are actually just subscriptions...

This is not an ideal solution, as "subscribe" posts by themselves will make the topic pop up in the activity queue of all current "subscribers", stealing their attention even if nothing of interest has happened. Many of us are annoyed about this, but we have as of yet no other way to follow an issue easily when we have nothing of value to actually comment about.

helloworld2016’s picture

Ok ok :) now it's clear. Thank your for the explanation.

eglobal’s picture

I am getting a slightly different error (but probably the same cause):
Strict warning: Declaration of votingapi_views_handler_field_value::element_type() should be compatible with that of views_handler_field::element_type() in _registry_check_code() (line 2789 of D:\Collaboration\Apache Software Foundation\Apache2.2\htdocs\drupal7\includes\bootstrap.inc).

sigmax’s picture

Status: Active » Reviewed & tested by the community

Just change in votingapi_views_handler_field_value.inc

// function element_type() {
function element_type($none_supported = FALSE, $default_empty = FALSE) {

Cheers

sigmax’s picture

Status: Reviewed & tested by the community » Needs review
mototribe’s picture

subscribing

lawnmower528’s picture

solution did not work for me (testing with view that also filters content by feed item). made sure voting for comments was not supported as readme suggested that views integration for comment-votes was not supported.

lawnmower528’s picture

also i am using the stable 7.3.0-rc1

lawnmower528’s picture

and the rate module as well but the problem is similar to eglobal's

jeefers’s picture

Im getting this along with a system/ajax error with the 'call' method being undefined whenever I add a new view.

hcmogensen’s picture

I got it to work when I changed it to:

// function element_type() {
function element_type($none_supported = FALSE, $default_empty = FALSE, $inline = FALSE) {

Anonymous’s picture

// function element_type() {
function element_type($none_supported = FALSE, $default_empty = FALSE, $inline = FALSE) {

Thanks, that worked for me too!

For the record, this problem came up for me while using the rate module and using views to output a table showing the Fivestar widget.

nguyentran’s picture

Thanks, that worked for me too!

geert’s picture

Thx, did the trick for me. I was on 7.2.4

Leeteq’s picture

does this call for a new release? (critical/views related affects lots of sites)

mefisto75’s picture

what did you guys do with /return 'div';/ part?

eaton’s picture

Status: Needs review » Fixed

Committed; this is in the dev snapshot and will be part of the next release.

Status: Fixed » Closed (fixed)

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

nnevill’s picture

function element_type($none_supported = FALSE, $default_empty = FALSE, $inline = FALSE) {
    return 'div';
  }

there is no this fix in dev or final release. pls add

perisdr’s picture

Status: Closed (fixed) » Active

Indeed I still get the error.

Strict warning: Declaration of votingapi_views_handler_field_value::element_type() should be compatible with that of views_handler_field::element_type() in require_once() (line 8 of ...\sites\all\modules\votingapi\views\votingapi_views_handler_field_value.inc).

oclaros1’s picture

Changing from:
function element_type($none_supported = FALSE, $default_empty = FALSE) {

Changing to:

function element_type($none_supported = FALSE, $default_empty = FALSE, $inline = FALSE) {

Worked for me.

MGParisi’s picture

Status: Active » Reviewed & tested by the community

#23 worked for me!

Anonymous’s picture

Has this been committed yet? The fix in 23 worked for me, as well.

jaydub’s picture

Status: Reviewed & tested by the community » Needs review
StatusFileSize
new548 bytes

Patch has been added to #1244850: No way to avoid this warning - Strict warning: Declaration of votingapi_views_handler_field_value. Posting the patch file here and marking the other issue as duplicate as this issue has more of the relevant details.

Leeteq’s picture

@eaton: what was actually committed in #19?

AlessMascherpa’s picture

Status: Needs review » Reviewed & tested by the community

The patch in #26 by @jaydub solves the error. Tests for views and votingAPI runed and passed.

torotil’s picture

Status: Reviewed & tested by the community » Fixed

Fix committed and in the current dev-branch. I plan to make a bug-fix release that also contains other fixes within the next week.

Status: Fixed » Closed (fixed)

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