Thread Rating:
  • 2 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
The Matrix: Blog
#26
(2013-08-07, 00:43:44)n00dles101 Wrote: looks like the matrix plugin itself is not activiated.

You should have 2 in the control panel "theMatrix" and "Matrix Blog"

the matrix plugin is activated, with the other dependencies as well.
(18n base, i18n, i18n search, pagify, the matrix, matrix blog)

Sad


Attached Files Thumbnail(s)
   
Reply
#27
(2013-08-07, 00:49:10)dedos Wrote:
(2013-08-07, 00:43:44)n00dles101 Wrote: looks like the matrix plugin itself is not activiated.

You should have 2 in the control panel "theMatrix" and "Matrix Blog"

the matrix plugin is activated, with the other dependencies as well.
(18n base, i18n, i18n search, pagify, the matrix, matrix blog)

Sad

I wanted to try this plugin and I have the same error on a clean install of GetSimple with the same plugins and versions.

Everything on my host seems alright by my health check (I didn't include the bottom part, but everything is listed as green and "OK").

   
Reply
#28
I can confirm that for me the 3 bolded lines in "class.php" aren't returning the expected values (true):
// check dependencies
private function checkDependencies() {
if (
class_exists('TheMatrix') &&
function_exists('i18n_init') &&
function_exists('get_i18n_search_results') &&
function_exists('pagify')

) return true;
else return false;
}

I tried this which seems to correct this problem, but makes it unstable in certain circumstances:
// check dependencies
private function checkDependencies() {
if (
class_exists('TheMatrix')
//class_exists('TheMatrix') &&
//function_exists('i18n_init') &&
//function_exists('get_i18n_search_results') &&
//function_exists('pagify')

) return true;
else return false;
}


Like, when I create my first entry then try to visit it on my website I get the following error:
Fatal error: Call to undefined function i18n_init() in /home/reallyho/public_html/plugins/matrix_blog/php/class.php on line 970

Which refers to this code in "class.php":
public function getPageType($slug) {
$slug = $this->matrix->str2slug($slug);
$entry = $this->matrix->query('SELECT * FROM '.self::TABLE_BLOG.' WHERE slug = "'.$slug.'"');
// entry
if ($entry) {
// get language
i18n_init(); // initialize i18n

I'm really a novice in php, so I'm still looking for a better solution. I seem to have pinpointed the problem on my installation though. It seems these dependancies aren't instatiated correctly.
Reply
#29
Sounds like a race condition, is this code in a hook callback? Which one?
Dependencies have to be checked afte all plugins are loaded say after the common hook
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
#30
Shawn is right, dependency check is done before all the plugins have loaded, probably 'pagify' as they are usually loaded alphabetically, although this is not always the case, depends on OS.
My Github Repos: Github
Website: DigiMute
Reply
#31
Found the source code relating to what everyone's been pointing out - still trying to sort out the race condition problem whilst upgrading the code for use with Matrix 1.03, which answers some of shawn's issues from github (apologies for the slowness of this response).

The main issue on the dependency check for the back end pages is that pagify hasn't loaded yet (as Matrix Blog loads before Pagify), so that aspect can easily be fixed. Fixing the i18n_init problem involves a bit more jiggling around (realized its because I fired the function in the constructor, at which point the plugin hooks and functions have yet to be loaded (strangely I didn't have this problem during initial testing).

Working as expediently as I can; can't promise the next release date (as it requires all my current matrix plugins fall into line with the next update). Thanks again for the testing.
Reply
#32
Changelog 1.02
- Fixed to work with Matrix 1.03.
- Fixed previously noted errors (hopefully)
Reply
#33
Howdy, how do I make it so that the main blog pages (with recent posts) is displayed at the index.php? My situation is that I installed GetSimple in a folder called "blog" and when I try to use the Matrix Blog, I can only reach my main page by going to Blog/Blog.
Reply




Users browsing this thread: 1 Guest(s)