rest-api-data-localizer icon indicating copy to clipboard operation
rest-api-data-localizer copied to clipboard

Warning: require callback.php. No such file or directory in radl.php. Line 62.

Open elsan32bit opened this issue 5 years ago • 5 comments

image

Help. I don't know what to do! Is the fix simple?

elsan32bit avatar Aug 01 '20 12:08 elsan32bit

I am also running into this issue. Any resolution or advice on how to diagnose?

brucbake07 avatar Aug 04 '20 23:08 brucbake07

I may have a solution...at least the error is resolved. Note my edit to line 62 in the radl.php file.

I changed the path to DIR and removed the string 'rest-api-data-localizer-master' in the str_replace function...so the function does not look for that directory.

private static function autoloader( $class_name ) { if ( strpos( $class_name, 'RADL' ) === 0 ) { require __DIR__ . str_replace( '\\', '/', str_replace( '_', '-', str_replace( 'radl', '', strtolower( $class_name ) ) ) ) . '.php'; } }

brucbake07 avatar Aug 04 '20 23:08 brucbake07

Thank you! You just saved me from a project I've been working on. Experimenting between regular Vue and Vue combined with WordPress! If only I had more experience in PHP I would've resolved this issue myself! Can you do me a favor and make this a pull request for me? I'd do it myself but I don't want to take away your credit.

elsan32bit avatar Aug 04 '20 23:08 elsan32bit

You're welcome, glad I could help you out. Hope the rest of the steps were pretty straight forward. I just got it working! (i think)

brucbake07 avatar Aug 05 '20 08:08 brucbake07

The plugin folder should be named rest-api-data-localizer not rest-api-data-localizer-master. If you change the name it will work.

sebastiancarlsson avatar Sep 16 '20 09:09 sebastiancarlsson