• Welcome to Tux Reports: Where Penguins Fly. We hope you find the topics varied, interesting, and worthy of your time. Please become a member and join in the discussions.

Solved Activate Xenword Pro version: 2017.10.23

Status
Not open for further replies.

robru

Baby Penguin
XenWord Professional
The plug-in can not be activated because it causes a fatal error.

Code:
Fatal error: Uncaught Error: Class 'XenWord\Admin\Links' not found in /var/www/html/wp-content/plugins/xenword-2017.10.23/xenword.php:46 Stack trace: #0 /var/www/html/wp-content/plugins/xenword-2017.10.23/xenword.php(144): XenWordPro->init() #1 /var/www/html/wp-admin/includes/plugin.php(1882): include('/var/www/html/w...') #2 /var/www/html/wp-admin/plugins.php(164): plugin_sandbox_scrape('xenword-2017.10...') #3 {main} thrown in /var/www/html/wp-content/plugins/xenword-2017.10.23/xenword.php on line 46
 

Gracie

Dogs Times Writer
Did you use FTP or upload the zip file? Can you look to see that the file structure is intact?
Did you have another version enabled then disable it?
 

robru

Baby Penguin
XenWord Professional
Did you use FTP or upload the zip file?
No, I used in WP the Plugin upload function.

Can you look to see that the file structure is intact?
20171023a.jpg

Did you have another version enabled then disable it?
First disabled version 3.5.2, then enabled Xenword-2017.10.23
 

LPH

Flight Director
Flight Instructor
Please add the following above line 46 in xenword.php.

PHP:
$e = new \Exception;
var_dump($e->getTraceAsString());

The autoload should find the classes but let's see what is happening.
 

robru

Baby Penguin
XenWord Professional
20171023b.jpg


Code:
Fatal error: Uncaught Error: Class 'XenWord\Admin\Links' not found in /var/www/html/wp-content/plugins/xenword-2017.10.23/xenword.php:46 Stack trace: #0 /var/www/html/wp-content/plugins/xenword-2017.10.23/xenword.php(144): XenWordPro->init() #1 /var/www/html/wp-admin/includes/plugin.php(1882): include('/var/www/html/w...') #2 /var/www/html/wp-admin/plugins.php(164): plugin_sandbox_scrape('xenword-2017.10...') #3 {main} thrown in /var/www/html/wp-content/plugins/xenword-2017.10.23/xenword.php on line 46
 

LPH

Flight Director
Flight Instructor
Well, I'm trying to recreate the issue and am curious on a few items.

Which PHP version is installed?
Were earlier version of XenWord installed?

Next, please go to line 46 and 47 and place \ in front of each directory to look like the following.

PHP:
new \XenWord\Admin\Links();
new \XenWord\Admin\Notices();

Let's see if that gets you past the activation.
 

robru

Baby Penguin
XenWord Professional
Which PHP version is installed?
PHP version 7.1.10

The Xenword version installed now is 3.5.2

Wordpress version 4.8.2

Xenforo version 1.15.X

I’am going to sleep now. Tomorrow I put the \ in place and try the activation again.
 

LPH

Flight Director
Flight Instructor
I’am going to sleep now. Tomorrow I put the \ in place and try the activation again.

I am working on a few other bug fixes in the legacy code and will upload a newer version tonight; however, your issue has me stumped.
 

LPH

Flight Director
Flight Instructor
our issue has me stumped.

I must finish for the evening and am still stumped; however, there are several significant bugs which were caught tonight.

Please test this code in the xenword.php file.

PHP:
   if ( ! file_exists( __DIR__ . '/vendor/autoload.php' ) ) {
    throw new Exception('Composer Autoload.');
      } else {
    require_once __DIR__ . '/vendor/autoload.php';
      }

require_once __DIR__ . '/src/admin/Links.php';
new XenWord\Admin\Links();

require_once __DIR__ . '/src/admin/Notices.php';
new XenWord\Admin\Notices();
 

LPH

Flight Director
Flight Instructor
If I change your last setting, I can activate Xenword 2017.

Fantastic.

Yes. While looking for a solution to why it wasn’t loading on your server, I found several bugs last night and was waiting to see if the code I posted works for you. I’ll post a new version after making a few more changes. One of the bugs incorrectly calls the path of the plugin; that is, it’s hardcoded to xenword/ and you could simply rename the xenword-2017.10.23 directory or wait for the fixes.

Interesting how a few others activated properly. Mine turns out because I have XF2 in a directory.
 

LPH

Flight Director
Flight Instructor
By the way, for your time and feedback, I’ve changed your license to lifetime. Thank you.
 

robru

Baby Penguin
XenWord Professional
Thank you for your kindness, patience and helpfulness :)

upload_2017-10-25_15-3-52.png
 
Last edited:

robru

Baby Penguin
XenWord Professional
I found several bugs last night and was waiting to see if the code I posted works for you.
Extra debug information ;)

PHP:
Error Info
ErrorException: Fatal Error: Cannot redeclare xenwordGetUGIds() (previously declared in /var/www/html/wp-content/plugins/xenword-2017.10.23/framework/xenword-init.php:1815) - /var/www/html/wp-content/plugins/xenword-3.5.2/admin/xenword-init.php:1793

PHP:
#0 [internal function]: XenForo_Application::handleFatalError()
#1 {main}
 

LPH

Flight Director
Flight Instructor
I've uploaded a new version for download. This has numerous fixes. The major ones are:

Fixed activation clashes when XenForo 2 is not present
class-xenword-add-users-to-wp.php - use in_array instead of $wp_role['0']
Removed use_online_members_avatars switch for online members widget.

I'll close this thread and another can be opened 'when' you find more issues. :)
 
Status
Not open for further replies.
Top