Friday, 07 October 2016
  5 Replies
  1.2K Visits
0
Votes
Undo
On a fresh install of Joomla 3.6.2, I attempted to install JEvents 3.4 with the file jevents34_3.4.22.zip with the date of October 7, 2016. The issue that I have is that the install attempts to add a column that already exists. On line 604 of the install.php script inside of the component folder, you are getting: "SHOW INDEX" and should be using: "SHOW COLUMN".

Just giving you a heads up before others attempt to install this new version and it breaks their existing jevents by updating a component and leaving the database in an non-updated state.

Should be:


$sql = "SHOW COLUMN FROM #__jevents_filtermap";
$db->setQuery($sql);
$cols = @$db->loadObjectList("Key_name");

if (!array_key_exists("andor", $cols))
{
$sql = "ALTER TABLE #__jevents_filtermap ADD COLUMN andor tinyint(3) NOT NULL default 0";
$db->setQuery($sql);
@$db->execute();
}

if (!array_key_exists("modid", $cols))
{
$sql = "ALTER TABLE #__jevents_filtermap ADD COLUMN modid int(12) NOT NULL default 0";
$db->setQuery($sql);
@$db->execute();
}

if (!array_key_exists("name", $cols))
{
$sql = "ALTER TABLE #__jevents_filtermap ADD COLUMN name varchar(255) $rowcharset NOT NULL default '' ";
$db->setQuery($sql);
@$db->execute();
}
Friday, 07 October 2016 13:56
·
#176722
0
Votes
Undo
GRRRR!!!!

Should be:


$sql = "SHOW COLUMNS FROM #__jevents_filtermap";
$db->setQuery($sql);
$cols = @$db->loadObjectList("Key_name");

if (!array_key_exists("andor", $cols))
{
$sql = "ALTER TABLE #__jevents_filtermap ADD COLUMN andor tinyint(3) NOT NULL default 0";
$db->setQuery($sql);
@$db->execute();
}

if (!array_key_exists("modid", $cols))
{
$sql = "ALTER TABLE #__jevents_filtermap ADD COLUMN modid int(12) NOT NULL default 0";
$db->setQuery($sql);
@$db->execute();
}

if (!array_key_exists("name", $cols))
{
$sql = "ALTER TABLE #__jevents_filtermap ADD COLUMN name varchar(255) $rowcharset NOT NULL default '' ";
$db->setQuery($sql);
@$db->execute();
}
Friday, 07 October 2016 13:56
·
#176723
0
Votes
Undo
Thanks - I'll take a look right now

JEvents Club members can get priority forum support at the Support Forum. As well as access to a variety of custom JEvents addons and benefits. Join the JEvents club today!

Friday, 07 October 2016 13:58
·
#176724
0
Votes
Undo
You're welcome! :D
Friday, 07 October 2016 14:02
·
#176726
0
Votes
Undo
OK. I must still be asleep.... :(

You'll also need to change the line:


$cols = @$db->loadObjectList("Key_name");


to:


$cols = @$db->loadObjectList("Field");


But, I am sure that you would notice that better than I did. LOL
Friday, 07 October 2016 14:17
·
#176731
0
Votes
Undo
Spotted that too (but not at first) - 3.4.23 has that included (though for about 2 minutes it didn't before I updated the file).

JEvents Club members can get priority forum support at the Support Forum. As well as access to a variety of custom JEvents addons and benefits. Join the JEvents club today!

  • Page :
  • 1
There are no replies made for this post yet.

Members Area

Show your support

Unlike many Joomla calendars we do not charge to download JEvents - please show your support for this project by becoming a member of the JEvents Club Club members get access to early releases, exclusive member support forums, and Silver and Gold members can use many exciting JEvents addons

Your membership will ensure that JEvents continues to be the best events calendar for Joomla.