Recent Topics

1 Oct 31, 2007 23:56    

My b2evolution Version: 2.x

When I click on a category I get these errors:

Warning: array_merge() [function.array-merge]: Argument #2 is not an array in /home/********/public_html/blog/inc/_core/_template.funcs.php on line 74

Warning: array_merge() [function.array-merge]: Argument #2 is not an array in /home/********/public_html/blog/inc/items/model/_itemlistlight.class.php on line 877


and the all too familiar SQL warning: An unexpected error has occured!

Anyone with an idea?

2 Nov 01, 2007 00:05

So, what was your last "fiddle" to code, as your categories were ok a day or so ago!

3 Nov 01, 2007 01:20

Hi John,

Thanks for watching after me B)
I uploaded all files again. The only thing I did last week was just an hour ago playing with the blog by email feature.
Still the problem persits. Only the All category (index.php?blog=x) works. If index.php?blog=x&cat=y then the error appears.

Weird, especially if it worked yesterday.

*edit*
I changed the settings for the testlab blog: no success
I checked the database: Categories intact

4 Nov 01, 2007 04:56

Update:
This is a bug that's reported [url=http://forums.b2evolution.net/viewtopic.php?t=12944&start=0&postdays=0&postorder=asc&highlight=arraymerge]here[/url].
Developers are working on it. the patch should do the trick (is in csv version already) but doesn't work on my blog. Hence I am running good old php 4.4.7 at the moment.
We wonder why my blog is affected and the demo blog with essential the same hardware (php 5.2.4) is not.

*edit*

Switched back to 5.2.4 so you can enjoy the errors. :roll:

5 Nov 01, 2007 17:06

I disabled E_WARNING to get rid of the errors I mentioned before, but I still have an SQL error on the Categories. This is the error:

Additional information about this error:
Output format [] not supported.


and this is the sql from the Categories:

-- Tabel structuur voor tabel `evo_categories`
--

CREATE TABLE `evo_categories` (
  `cat_ID` int(11) unsigned NOT NULL auto_increment,
  `cat_parent_ID` int(11) unsigned default NULL,
  `cat_name` tinytext NOT NULL,
  `cat_blog_ID` int(11) unsigned NOT NULL default '2',
  `cat_description` varchar(250) default NULL,
  `cat_longdesc` text,
  `cat_icon` varchar(30) default NULL,
  `cat_urlname` varchar(255) NOT NULL default '',
  PRIMARY KEY  (`cat_ID`),
  UNIQUE KEY `cat_urlname` (`cat_urlname`),
  KEY `cat_blog_ID` (`cat_blog_ID`),
  KEY `cat_parent_ID` (`cat_parent_ID`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=33 ;

--
-- Gegevens worden uitgevoerd voor tabel `evo_categories`
--

INSERT INTO `evo_categories` VALUES(1, NULL, 'Algemeen', 2, NULL, NULL, NULL, 'c1');
INSERT INTO `evo_categories` VALUES(2, NULL, 'Nieuws', 2, NULL, NULL, NULL, 'c2');
INSERT INTO `evo_categories` VALUES(3, NULL, 'Achtergrond', 2, NULL, NULL, NULL, 'c3');
INSERT INTO `evo_categories` VALUES(25, NULL, 'Images', 7, NULL, NULL, NULL, 'c25');
INSERT INTO `evo_categories` VALUES(24, NULL, 'Test', 6, NULL, NULL, NULL, 'c24');
INSERT INTO `evo_categories` VALUES(22, NULL, 'Wiki', 5, NULL, NULL, NULL, 'c22');
INSERT INTO `evo_categories` VALUES(23, NULL, 'Announcement', 6, NULL, NULL, NULL, 'c23');
INSERT INTO `evo_categories` VALUES(19, NULL, 'Politiek', 2, NULL, NULL, NULL, 'c19');
INSERT INTO `evo_categories` VALUES(18, NULL, 'Bridge', 4, NULL, NULL, NULL, 'c18');
INSERT INTO `evo_categories` VALUES(17, NULL, 'Algemeen', 4, NULL, NULL, NULL, 'c17');
INSERT INTO `evo_categories` VALUES(12, NULL, 'b2evolution', 4, NULL, NULL, NULL, 'c12');
INSERT INTO `evo_categories` VALUES(13, NULL, 'contributors', 4, NULL, NULL, NULL, 'c13');
INSERT INTO `evo_categories` VALUES(14, NULL, 'Films', 2, NULL, NULL, NULL, 'c14');
INSERT INTO `evo_categories` VALUES(15, NULL, 'Boeken', 2, NULL, NULL, NULL, 'c15');
INSERT INTO `evo_categories` VALUES(16, NULL, 'Bridge', 2, NULL, NULL, NULL, 'c16');
INSERT INTO `evo_categories` VALUES(26, 25, 'GIMP', 7, NULL, NULL, NULL, 'c26');
INSERT INTO `evo_categories` VALUES(27, NULL, 'Main category', 8, NULL, NULL, NULL, 'main');
INSERT INTO `evo_categories` VALUES(28, NULL, 'Chessboard render', 8, NULL, NULL, NULL, 'chessboard');
INSERT INTO `evo_categories` VALUES(29, NULL, 'Main category', 9, NULL, NULL, NULL, 'main-1');
INSERT INTO `evo_categories` VALUES(30, NULL, 'Main category', 10, NULL, NULL, NULL, 'main-2');
INSERT INTO `evo_categories` VALUES(31, NULL, 'Foto''s', 10, NULL, NULL, NULL, 'foto');
INSERT INTO `evo_categories` VALUES(32, NULL, 'Gallery', 10, NULL, NULL, NULL, 'gallery');

Any ideas appreciated.

6 Nov 12, 2007 00:29

After debugging this on IRC, we've found that the am_custom_plugin is the cause.

It calls request_title, but with the old API:
request_title( " - ", "", " - ", "htmlhead" )
(in am_custom_plugin/_am_custom.plugin.php on line 152)

This should get changed to:


request_title( array(
	'title_before' => ' - ',
	'glue' => ' - ',
	'format' => 'htmlhead',
) );


for b2evo 2.x.

Something like:
[code]
if( version_compare($app_version, '2.0-dev', '>=') )
{
// post-2.0 code here
}
else
{
// pre-2.0 code here
}

7 Nov 12, 2007 00:34

Thanks blueyed,

nice job

8 Nov 12, 2007 13:32

Nice bit of debugging ;)

As it happens the 2.x version of the plugin doesn't use that at all for the title ( probably why I've not had a problem with my categories :p ), but it's still got some flaws to sort so I've not updated the zip.

¥


Form is loading...