Webservice
ExpressionEngine 2, ExpressionEngine 3, ExpressionEngine 4
Back to this add-on's main page
View Other Add-ons From Rein de Vries
Error After Attempting Install
Support (Resolved)
farreachjason
|
Posted: 30 October 2015 03:57 PM |
|
|
|
After attempting to install the Webservice add-on, we are getting the following error:
Fatal error: Call to undefined function cp_url() in /home/shw/ee_client/third_party/webservice/libraries/webservice_helper.php on line 576
Is there something else that needs to be installed?
Thanks.
Jason
|
|
|
farreachjason
|
Posted: 30 October 2015 04:04 PM |
# 1
|
|
|
I added the following to config.php:
// EE 2.8 cp_url function is now used to generate URLs - need to provide it if // we are on a version prior to EE 2.8 if(!function_exists('cp_url')) { function cp_url($path, $qs = '') { $path = trim($path, '/'); $path = preg_replace('#^cp(/|$)#', '', $path); $segments = explode('/', $path); $result = BASE.AMP.'C='.$segments[0].AMP.'M='.$segments[1]; if (is_array($qs)) { $qs = AMP.http_build_query($qs, AMP); } $result .= $qs; return $result; } }
It seemed to fix the issue. Is this the appropriate fix?
Thanks.
Jason
|
|
|
Reinos
|
Posted: 31 October 2015 06:08 AM |
# 2
|
|
Developer
|
What version of EE do you use?
And it is also better to add that in the compat.php.
Will add this to the build.
Thanks!
Best,
Rein
|
|
|
farreachjason
|
Posted: 31 October 2015 07:06 AM |
# 3
|
|
|
Rein -
Thanks. I moved this to compat.php.
We are running EE 2.7.3.
Jason
|
|
|