[Solved] Call to undefined method wpdFormAttr\Form::getFormCustomFields()  

  RSS

HenriMatthijssen
(@henrimatthijssen)
Member Customer
Joined: 1 year ago
Posts: 22
26/04/2018 7:45 pm  

wpDiscuz Comment Search Versie: 1.1.9 on latest WordPress 4.9.5 with Avada Theme 5.5

In "Available search fields" I have seleced 'All', 'Content', 'Author' and 'Email'. Further I have set "Default search field" to 'All'.

When I press the 'search settings' button I notice that initially only 'Content', 'Author' and 'Email' is shown. I would have expected the 'All' selection as well.

When I search for a phrase I get an error:

Error thrown
Call to undefined method wpdFormAttr\Form::getFormCustomFields()

When I select in 'search settings' explicitly a field it works again. However funny enough when I check the 'search settings' after this it displays different content ('All', 'Author' and 'Email').

I have the feeling you have a bug in your code for populating the 'search settings'.


ReplyQuote
Astghik
(@astghik)
Support Team Admin
Joined: 1 year ago
Posts: 1542
26/04/2018 9:01 pm  

Hi HenriMatthijssen,

Please navigate to Dashboard > Comments > Settings > Addons > Comment Search admin page, click on "Reset Options" button. 

resent options

Then delete all caches and check it again. 

 

 


ReplyQuote
HenriMatthijssen
(@henrimatthijssen)
Member Customer
Joined: 1 year ago
Posts: 22
26/04/2018 10:21 pm  

I tried that 'reset options' (lost all my translations, color settings, etc). Further I deleted my Supercache, Pagespeed cache and all caches of my web-browsers with CCleaner, but I am still getting the same results as above.

First indication that it is wrong is already that despite I have enabled in "Available search fields" the settings 'All', 'Content', 'Author' and 'Email' and as "Default search field" set 'All', that when I press the 'search settings' button on my blog I notice that initially only 'Content', 'Author' and 'Email' is shown in dropdown box. I would have expected the 'All' selection as well here.


ReplyQuote
Astghik
(@astghik)
Support Team Admin
Joined: 1 year ago
Posts: 1542
26/04/2018 10:42 pm  

1. 

 Error thrown
Call to undefined method wpdFormAttr\Form::getFormCustomFields()

We need to know is this issue fixed?

2. 

First indication that it is wrong is already that despite I have enabled in "Available search fields" the settings 'All', 'Content', 'Author' and 'Email' and as "Default search field" set 'All', that when I press the 'search settings' button on my blog I notice that initially only 'Content', 'Author' and 'Email' is shown in dropdown box. I would have expected the 'All' selection as well here.

This is the addon working logic. If you select one of these as value of  Default search field, it will not be shown  from frontend. 


ReplyQuote
HenriMatthijssen
(@henrimatthijssen)
Member Customer
Joined: 1 year ago
Posts: 22
26/04/2018 10:54 pm  

1. No I still have the same error. It seems only happening when using 'All'. Is this related to 'Custom Fields' which I have de-selected. Can you further explain what 'Custom Fields' means and how to configure it? See attached screenshot for the error:

screenshot.jpg

2. OK. Understood


ReplyQuote
Astghik
(@astghik)
Support Team Admin
Joined: 1 year ago
Posts: 1542
26/04/2018 11:02 pm  

I'm sorry but there is no way to help you without having admin access. Could you please send admin login details to support[at]gvectors.com email address?


ReplyQuote
HenriMatthijssen
(@henrimatthijssen)
Member Customer
Joined: 1 year ago
Posts: 22
26/04/2018 11:10 pm  

Can you first explain what 'Custom Fields' means and how to configure it? I have the feeling this is the culprit as I do not use/have it?

Update: I am pretty sure it is related to 'Custom Fields'. Only when I use as search 'All' or 'Custom Fields' I get this error-message.


ReplyQuote
HenriMatthijssen
(@henrimatthijssen)
Member Customer
Joined: 1 year ago
Posts: 22
26/04/2018 11:33 pm  

Workaround for avoiding this issue is now:

Select only 'Content', 'Author' and 'Email' as "Available search fields" and use 'Content' as "Default search field".

However I would prefer to have "Default search field" for 'All' which is with this workaround not possible.


ReplyQuote
Astghik
(@astghik)
Support Team Admin
Joined: 1 year ago
Posts: 1542
26/04/2018 11:55 pm  

Dear @henrimatthijssen,

Custom fields is that you create in your "Default form" in Dashboard > Comments > Form admin page. 

e.g. new Rating field.

rating

More info here:

https://wpdiscuz.com/docs/wpdiscuz-documentation/comment-forms/

I suggest you the following temporary solution.

1. In wpDiscuz > forms > wpdFormAttr > Form.php file find this line

 public function setFormID($formID) {

add code here

2. Add the following code above it

public function getFormCustomFields () {
       return $this->formCustomFields;
 }

pass

This will be fixed in next version release.


ReplyQuote
HenriMatthijssen
(@henrimatthijssen)
Member Customer
Joined: 1 year ago
Posts: 22
27/04/2018 12:13 am  

This fixed the issue. Thank you very much! This thread can be closed.


Astghik liked
ReplyQuote
Share: