GetSimple Support Forum
The Matrix: Blog - Printable Version

+- GetSimple Support Forum (http://get-simple.info/forums)
+-- Forum: GetSimple (http://get-simple.info/forums/forumdisplay.php?fid=3)
+--- Forum: Plugins (http://get-simple.info/forums/forumdisplay.php?fid=13)
+--- Thread: The Matrix: Blog (/showthread.php?tid=4911)

Pages: 1 2


RE: Matrix Blog - dedos - 2013-08-07

(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


RE: Matrix Blog - magik - 2013-08-07

(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").

[attachment=247]


RE: Matrix Blog - magik - 2013-08-07

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.


RE: Matrix Blog - shawn_a - 2013-08-07

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


RE: Matrix Blog - n00dles101 - 2013-08-07

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.


RE: Matrix Blog - Angryboy - 2013-08-09

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.


RE: Matrix Blog - Angryboy - 2013-08-18

Changelog 1.02
- Fixed to work with Matrix 1.03.
- Fixed previously noted errors (hopefully)


RE: The Matrix: Blog - JaceX - 2013-11-17

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.