Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The method $sc_REReplaceCallback is part of a plugin but was not found in the base object #3

Open
basshcm opened this issue Sep 25, 2018 · 2 comments

Comments

@basshcm
Copy link

basshcm commented Sep 25, 2018

neokoenig, I was trying to use the shortcodes plugin with cfwheels 2.0.

I am receiving the following error....

Wheels.MethodNotFound
The method $sc_REReplaceCallback is part of a plugin but was not found in the base object.

Tag context
Error thrown on line 152 in plugins\Shortcodes\Shortcodes.cfc
- called from line 77 in wheels\plugins\runners.cfm
- called from line 28 in plugins\Shortcodes\Shortcodes.cfc
- called from line 77 in wheels\plugins\runners.cfm
- called from line 7 in /wheels../views/login/index.cfm
- called from line 117 in wheels\global\cfml.cfm
- called from line 474 in wheels\controller\rendering.cfm
- called from line 225 in wheels\controller\rendering.cfm
- called from line 66 in wheels\controller\rendering.cfm
- called from line 134 in wheels\controller\processing.cfm
- called from line 91 in wheels\controller\processing.cfm
- called from line 184 in wheels\dispatch\functions.cfm
- called from line 5 in wheels\index.cfm
- called from line 2 in rewrite.cfm
- called from line 5 in wheels\events\onrequest.cfm

However it works when replacing line 28
result=$sc_REReplaceCallback(string=content, pattern=$sc_getRegex(), callback=$sc_processTag, scope="all");
with
result=$sc_REReplaceCallback(string=content, pattern=$sc_getRegex(), scope="all");

AND line 152
replace = callback(parts);
with
replace = $sc_processTag(parts);

I am confused why the callback function is not being recognized? I appreciate any help/direction you could give me.

@neokoenig
Copy link
Owner

I believe this is related to cfwheels/cfwheels#841 which is on our bug fix list for 2.1 - or at least, I think this is contributing to it: I think the function name callback is clashing with existing methods in the scope.

@basshcm
Copy link
Author

basshcm commented Sep 25, 2018

Thanks neokoenig. like I mentioned, I have a workaround for now. I will watch for the cfwheels 2.1 update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants