Quantcast
Channel: Recent Discussions — DataTables forums
Viewing all articles
Browse latest Browse all 82042

Field.php - difference in path between local PC and hosted server for call_user_func(

$
0
0
Downloaded DataTables v 1.9.4 & Editor to evaluate Editor for purchase.

Finally got Firebug to display something in Console. Needed to re-install it as either it was not working, or I could not get it to display the Console data, even though I enabled it, as shown in the Youtube demos. It did work as expected and display in Console after a re-install.

Using my local Windows PC for development which is running WAMP I went to:

/datatables/extras/Editor/examples/index.html

and selected 1 row and clicked Edit and then Update

I kept getting a POST Response:

<b>Warning</b>: call_user_func() expects parameter 1 to be a valid callback, class '\DataTables\Editor\Validate' not found in <b>E:\Todd\git\tutti_systems\Tutti Systems\public_html\datatables\extras\Editor\examples\php\lib\Editor\Field.php</b> on line <b>379</b><br />

But, when I uploaded to my VPS at my hosting company, it worked fine.

So, on line 379, I changed from:

return call_user_func( "\\DataTables\\Editor\\".$this->_validator, $val, $data, $this->_validatorOpts );

to this FIX:

return call_user_func( "DataTables\\Editor\\".$this->_validator, $val, $data, $this->_validatorOpts );

and it works on both my local Windows PC using WAMP and on my VPS at my hosting company. It appears to me I've just made this a relative path. Correct?

I assume that the way it's working on my hosted server, but not my local WAMP on my PC, is a difference between either Apache on a Windows/Apache/WAMP versus a Linux server, or a difference in the two httpd.conf settings.

QUESTION: A) Is the FIX above that I implemented a change you'd make to the Field.php file in a future release [or via some other type of fix],

or B) should I try and figure out why my local Windows PC using WAMP does not handle that path the same as my hosted server?

If B) you have any idea what setting to look at?

Thanks!

Todd

Viewing all articles
Browse latest Browse all 82042

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>