• 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.

XenWord Development October 2016

Status
Not open for further replies.

LPH

Flight Director
Flight Instructor
Development environment was upgraded to Sierra and MAMP 4, only to have everything not working properly. It took weeks of debugging (limited time) and I finally backed everything up, erased the drive, and reinstalled Sierra, Chrome, MAMP Pro, and PHPStorm. Phew. There needs to be a faster way to create a development environment.

Redirects and login issues continue to haunt XenWord. I was unable to track down the redirect problem new users are describing until I decided to reinstall WordPress and XenForo from scratch. This is what I learned.

First, if the installer does not rename the htaccess.txt file in XenForo directory then /wp-admin redirects to 404 pages. A simple rename of htaccess.txt to .htaccess fixes the issue.

Second, if $xenword_options is empty in the WordPress database then there is an illegal offset. I'm working through a conditional in the method widgets in class-xenword-loader.php to avoid the error. Of course, the error is not present once $xenword_options exist in the database.

Third, I've spent weeks trying to figure out how to use the XenForo email account as an option to login to WordPress. This is now working on a new local test environment, however, there are no conditional to check if the user doesn't exist in WordPress and must be added. It's a work in progress.

WP Login Via XenForo email.png
 

LPH

Flight Director
Flight Instructor
To track down bugs, I decided to continue adding master on/off switches for different systems. The image below shows the Master On/Off for XenWord.

XenWord Master Switch.png

This master on/off switch allows XenWord to be completely turned off without deactivating the plugin. The default is "Off" so that settings can be done prior to switching the plugin on. Interestingly, adding this switch led to finding situations in which adding a conditional for class_exists was necessary.

The php files are also being isolated into the systems. The main xenword.php file now requires the class-xenword-loader.php, which loads the include files for each system. This stops some of the redundancy from older versions. This should help locating any hidden bugs.

In terms of bug hunting: spent the better part of yesterday trying to track down the "comments closed" being reported. Getting the on/off switches working for the different systems may help isolate the issue. At this point, though, there is nothing new to report.
 

LPH

Flight Director
Flight Instructor
Current Changelog

( 116 ) 3.1.1.0 - October 23, 2016
Tested with WordPress 4.6.1 and XenForo 1.5.10
New Experimental Feature: Login using XenForo member and matched to WordPress user by email.
New Switch: Master On/Off Switch for XenWord
File Rearrangement for Consistency in each system
Bug Fix: Loading includes after wp_get_current_user
Bug Fix: Comments Closed
Bug Fix: Action links
Bug Fix: Footer loading
Bug Fix: Added conditionals when XenWord Switch is Off
 

LPH

Flight Director
Flight Instructor
After 60 plus hours, here is a video of XenWord 3.1.1. The installation is much smoother with the new switches.

 

LPH

Flight Director
Flight Instructor
After watching a nice video on the SOLID php concepts, a few changes were made so that the XenWord_Includes class was removed. There was also a duplicate call to the class-xenword-loader.php in the xenword.php file.

( 117 ) 3.1.2.0 - October 26, 2016
New File: class-xenword-discussions-loader.php
New Switch: Master On/Off Switch for Author System
Move class-xenword-multisite-admin.php to new directory includes/Admin
Deprecated class-xenword-includes.php
Bug Fix: Duplicate call to class-xenword-loader.php in xenword.php

The new master switch for Authors might help identify some issues. However, nothing is being found in the three files that supports the remaining bug reports.

This may be an ID alignment issue - and I'm thinking a 'catch' might help in which user_id in XenForo with one email is different from the matching ID in WordPress. The placement of this "catch" is undetermined -- maybe a page in the XenWord Settings Panel.
 

LPH

Flight Director
Flight Instructor
Oops. Forgot to post yesterday. Released XenWord 3.1.2 after finding the bugs for author descriptions. The problems were due to the insert_meta function and not in the three author files. All bugs in the bug report forum have been addressed.
 
Status
Not open for further replies.
Top