jpSimkins / Drupal2WordPress-Plugin

WordPress plugin for importing Drupal
51 stars 20 forks source link

Class 'Drupal2Wordpress' not found #2

Closed UncoolAsianDad closed 9 years ago

UncoolAsianDad commented 9 years ago

Hi, I am having this issue when activating the plugin PHP Fatal error: Class 'Drupal2WordPress' not found in /var/www/html/wordpress/wp-content/plugins/drupal2wp/drupal2wp.php on line 60

I am using PHP 5.3.3 (cli) (built: Oct 30 2014 20:12:53)

is this a php version issue?

jpSimkins commented 9 years ago

It appears the autloader is not working. Perhaps your issue is your PHP version. See http://php.net/manual/en/language.oop5.autoload.php

Note:
Autoloading is not available if using PHP in CLI interactive mode.

Although I thought it would output interactive...

You could just include those file above the autoloader function. This should work but it hasn't been tested.

require_once(__DIR__.'/inc/Drupal2WordPress.php');
require_once(__DIR__.'/inc/Drupal2WordPress_DrupalDB.php');
require_once(__DIR__.'/inc/Drupal2WordPress_DrupalImporter.php');
require_once(__DIR__.'/inc/Drupal2WordPress_ViewProcessor.php');
require_once(__DIR__.'/inc/Drupal2WordPress_Views.php');
require_once(__DIR__.'/inc/Drupal2WordPressDrupalVersionAdapterInterface.php');
require_once(__DIR__.'/inc/Drupal2WordPressDrupalVersionAdapter.php');
require_once(__DIR__.'/inc/Drupal2WordPressDrupalImporter_7.php');

Do you have any errors in your PHP error log? Try turning on WP_DEBUG and see what it outputs.