DesignPlug / wxp-dom-router

Create Cleaner, Reusable and Scalable Wordpress views with WXP DomRouter. WXP DomRouter provides an organized way to handle your queries and other business logic, and make variables accessible in wordpress templates. Wordpress body classes provide a ton of information about the current page that WXP DomRouter allows Theme developers make use of for determining what content should be loaded on each page.
2 stars 0 forks source link

Not working out of the box... #1

Closed corradomatt closed 4 years ago

corradomatt commented 9 years ago

This looks really cool and I like that it's base on roots. It seems like there are some issues with getting this working on a linux/apache host. Is this just not finished or is your default setup for a different hosting environment?

coding-stuff commented 9 years ago

Are you receiving an error message of some kind? If not navigate to your wp-config.php file in the root directory of your Wordpress installation and turn on error reporting by setting WP_DEBUG to true. note: it only works with PHP 5.3 and up

corradomatt commented 9 years ago

Wow! You'd think since I build websites for a living I would be a little better at error reporting...sorry about that!

Upon activation I get this error - Warning: require(lib\wxp-dom-router.php): failed to open stream: No such file or directory in .../www.theme-testdrive.dev/wp-content/themes/wxp-starter-theme/functions.php on line 5

I can fix this error by changing line 5 in functions.php to require "lib/wxp-dom-router.php";. This returns the admin with only a php notice of WXP_HEADER_LOGO_DIMEN being an undefined constant.

But the real issue now is that I get a fatal error on the front end.... Fatal error: Class 'Theme\Controllers\ViewController' not found in .../www.theme-testdrive.dev/wp-content/themes/wxp-starter-theme/lib/WXP/src/WXP/WXP.php on line 207

corradomatt commented 9 years ago

Whoops! Noticed that I messed up again because this issue should have been posted on https://github.com/DesignPlug/wxp-starter-theme and not here!

coding-stuff commented 9 years ago

Either the file is not actually there or something is going wrong with the autoloader. Are you trying to use the class?. I'm going to dump the current autoloader and switch to composer. Also FYI you can use regular functions for callbacks as well.