victorjonsson / Arlima

Article List Manager - Wordpress plugin suitable for online newspapers that's in need of a fully customizable front page
28 stars 16 forks source link

Current version of Arlima (3.1.beta.27) is not installable #89

Closed drawski closed 9 years ago

drawski commented 9 years ago

After activating Arlima in admin panel, following error occurs:

Uncaught Exception: Uncaught exception 'Exception' with message 'Table 'ab_wordpress.ab_XXX_arlima_articlelist' doesn't exist' in /wordpress/wp-content/plugins/Arlima/classes/WP/Facade.php:309

where XXX is the ID of current blog (site) in multisite installation.

victorjonsson commented 9 years ago

Current version is 3.1.beta.41 . Please try again and let me know if the problem persists.

PS. remember that none of the "current" versions are in any way stable. We're getting close to a stable 3.1 version but I think it's a couple of weeks left..

chredd commented 9 years ago

I created a release for 3.1.beta.41 making it available for Composer: https://github.com/victorjonsson/Arlima/releases/tag/3.1.beta.41

awikell commented 9 years ago

Hi, To clarify what @drawski meant, the latest master of Arlima doesn't install itself properly as a WordPress plugin. We realize that master is in no way stable but we needed some of the code changes you've made to how File Include paths are handled since 3.0.beta.61.

The master branch worked fine when we tested it on our existing sites which had Arlima installed since before, but if we create a new site and activate the Arlima plugin /wp-admin/ fails with a 500 Internal Server error. I Just verified that this happens with 3.1.beta.41 also. The stacktrace:

[Wed Mar 04 16:56:11 2015] [error] [client 192.168.50.1] WordPress databasfel f\xc3\xb6r Table 'wordpress.ab_445_arlima_articlelist_article' doesn't exist f\xc3\xb6rfr\xc3\xa5gan SELECT * FROM ab_445_arlima_articlelist_article LIMIT 0,1 skapat av require_once('wp-admin/admin.php'), require_once('wp-load.php'), require_once('/vagrant/wordpress/wp-config.php'), require_once('wp-settings.php'), do_action('init'), call_user_func_array, Arlima_WP_Plugin->adminInitHook, Arlima_WP_Plugin::update, Arlima_ListVersionRepository->updateDatabaseTables, Arlima_WP_Facade->runSQLQuery, referer: https://wordpress.local/skrap/wp-admin/plugins.php
[Wed Mar 04 16:56:11 2015] [error] [client 192.168.50.1] PHP Fatal error:  Uncaught exception 'Exception' with message 'Table 'wordpress.ab_445_arlima_articlelist_article' doesn't exist' in /vagrant/wordpress/wp-content/plugins/Arlima/classes/WP/Facade.php:311\nStack trace:\n#0 /vagrant/wordpress/wp-content/plugins/Arlima/classes/ListVersionRepository.php(590): Arlima_WP_Facade->runSQLQuery('SELECT * FROM a...')\n#1 /vagrant/wordpress/wp-content/plugins/Arlima/classes/WP/Plugin.php(464): Arlima_ListVersionRepository->updateDatabaseTables(0)\n#2 /vagrant/wordpress/wp-content/plugins/Arlima/classes/WP/Plugin.php(268): Arlima_WP_Plugin::update()\n#3 [internal function]: Arlima_WP_Plugin->adminInitHook('')\n#4 /vagrant/wordpress/wp/wp-includes/plugin.php(470): call_user_func_array(Array, Array)\n#5 /vagrant/wordpress/wp/wp-settings.php(352): do_action('init')\n#6 /vagrant/wordpress/wp-config.php(236): require_once('/vagrant/wordpr...')\n#7 /vagrant/wordpress/wp/wp-load.php(34): require_once('/vagrant/wordpr...')\n#8 /vagrant/wordpress/wp/wp-admin/admin.php(30): require_once('/vagrant/wordpr...')\n in /vagrant/wordpress/wp-content/plugins/Arlima/classes/WP/Facade.php on line 311, referer: https://wordpress.local/skrap/wp-admin/plugins.php
victorjonsson commented 9 years ago

hm... okey. So you updated arlima from 3.0.beta61 to 3.1.beta.41 ?

awikell commented 9 years ago

Yes

victorjonsson commented 9 years ago

What wp version may I ask?

drawski commented 9 years ago

WordPress 3.9.3

victorjonsson commented 9 years ago

This is indeed interesting... I have some questions:

victorjonsson commented 9 years ago

I'm not sure if Arlima actually supports multi-site installations. I can reproduce this error by doing the following.

  1. I have a multi-site installation with a couple of sites (wp 3.9.3)
  2. Activate arlima for the entire network
  3. Create a new site
  4. Visit the new site.

Is this the same workflow that you have?

drawski commented 9 years ago

@victorjonsson Regarding your last question. Actually we know that Arlima throws errors while network activated so we always activate it on the site level. It was working... until now.

victorjonsson commented 9 years ago

First off. Arlima does not support a network wide installation. It creates a lot of mess and Arlima is not capable of cleaning up after itself when uninstalled. Arlima will now throw an exception if being installed network wide.

However, installing Arlima on individual sites in a multi-site network should not be any problem. The error log you attached implies that arlima is installed (according to wordpress) but that the install-function never has run, or that the database tables that gets created is removed. I have added a fix for this.

If you have installed arlima network wide you should first of all deactivate it in network admin before upgrading arlima to the latest version in the master branch.

awikell commented 9 years ago

Thanks for the response victor. We're going to try your latest master branch now. If this works, would you mind creating a release for 3.1.beta.43 with your commits from yesterday? We'd rather not have a reference to your master in our composer

awikell commented 9 years ago

@drawski and me have just confirmed that it works. Could you make a release for us? Thanks a lot for the quick response!

chredd commented 9 years ago

Creating a release for 3.1.beta43!

drawski commented 9 years ago

It works like a charm on multisite installation. Thanks a lot! I think we can close this issue @victorjonsson :)

victorjonsson commented 9 years ago

Great.