Archived

Difference between revisions of "Reinstalling deleted Joomla 2.5 core extensions"

From Joomla! Documentation

 
(18 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
Some Joomla 2.5.x core components (Banners, Contacts, Newsfeeds, Smart Search, and Weblinks) can be deleted via the Back-end: Extensions > Extension Manager > Manage > (select + delete)
 
Some Joomla 2.5.x core components (Banners, Contacts, Newsfeeds, Smart Search, and Weblinks) can be deleted via the Back-end: Extensions > Extension Manager > Manage > (select + delete)
Core component installation packages don't exist because it's too much work to maintain.
 
  
= Reinstallation information per core-component =
+
Core component installation packages don't exist because it's too much work to maintain, and Joomla 2.5 has a nice feature called "discover".
With some FTP & phpMyAdmin knowledge you will be able to reinstall deleted core components.
 
In general, if you have deleted some core component by mistake, use the following steps to reinstall:
 
* Download & unzip the Joomla Full 2.5.x package of your current version
 
* Before following the next steps, backup your site (files + database)
 
* Re-upload the component's files for the front-end and the back-end (see info below)
 
* Re-create the reference to the component in your database with phpMyAdmin (see info below)
 
  
Next you will find the necessary information to reinstall a core component, all displayed in the format:
+
'''Note:''' The following method is recommended:
* Name
+
# Upload and merge the contents of a Joomla full package (without /installation/ directory) to the root of your website. If you're comfortable with SSH you can unzip the package and merge it. Otherwise, use an FTP client that lets you do a merge/replace and choose merge for any folder your ftp client asks you about and overwrite for any file it asks you about. Using merge for folders instead of just replace will leave your non Joomla files alone (things not included in the install package) while replacing only the files that are in the package you're uploading with new ones and replacing any missing files. WARNING! if you simply upload and don't merge, you'll overwrite anything installed and likely break your site.
* Directories + files to re-upload (front-end and back-end)
+
# Use Extensions > Extension Manager > Discover to discover & install uninstalled extensions.
* SQL query to run in phpMyAdmin to restore the reference in the jos_components table ('''note:''' '''assuming that your table prefix is the default jos_''' )
+
# The components table structures + the component reference in #__extensions + the component menu items will all be created automatically.
 +
# The component reference in #__assets will not be created using "discover": to recreate, use Components > [component name] > [Options] (icon in upper right corner) > Permissions (tab) > [save & close]
  
== Banners ==
+
If you're doing this to repair a broken upgrade, you'll also want to use the database repair function found in the extensions manager area to fix the database.
Upload all files & directories under:
 
* /administrator/components/com_banners/
 
* /components/com_banners/
 
  
Use phpMyAdmin to run the following SQL statements to recreate the references (replace jos_ with your own table prefix!):
+
<noinclude>
=== Banner reference in Assets table ===
+
[[Category:Tips and tricks 2.5|Components]]
<source lang="sql">INSERT INTO `jos_assets` VALUES(3, 1, 3, 6, 1, 'com_banners', 'com_banners', '{"core.admin":{"7":1},"core.manage":{"6":1},"core.create":[],"core.delete":[],"core.edit":[],"core.edit.state":[]}');
+
[[Category:Components]]
INSERT INTO `jos_assets` VALUES(28, 3, 4, 5, 2, 'com_banners.category.3', 'Uncategorised', '{"core.create":[],"core.delete":[],"core.edit":[],"core.edit.state":[]}');
+
</noinclude>
</source>
 
 
 
===Banner Tables Structure===
 
<source lang="sql">--
 
-- Table structure for table `jos_banners`
 
--
 
 
 
CREATE TABLE IF NOT EXISTS `jos_banners` (
 
  `id` int(11) NOT NULL AUTO_INCREMENT,
 
  `cid` int(11) NOT NULL DEFAULT '0',
 
  `type` int(11) NOT NULL DEFAULT '0',
 
  `name` varchar(255) NOT NULL DEFAULT '',
 
  `alias` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '',
 
  `imptotal` int(11) NOT NULL DEFAULT '0',
 
  `impmade` int(11) NOT NULL DEFAULT '0',
 
  `clicks` int(11) NOT NULL DEFAULT '0',
 
  `clickurl` varchar(200) NOT NULL DEFAULT '',
 
  `state` tinyint(3) NOT NULL DEFAULT '0',
 
  `catid` int(10) unsigned NOT NULL DEFAULT '0',
 
  `description` text NOT NULL,
 
  `custombannercode` varchar(2048) NOT NULL,
 
  `sticky` tinyint(1) unsigned NOT NULL DEFAULT '0',
 
  `ordering` int(11) NOT NULL DEFAULT '0',
 
  `metakey` text NOT NULL,
 
  `params` text NOT NULL,
 
  `own_prefix` tinyint(1) NOT NULL DEFAULT '0',
 
  `metakey_prefix` varchar(255) NOT NULL DEFAULT '',
 
  `purchase_type` tinyint(4) NOT NULL DEFAULT '-1',
 
  `track_clicks` tinyint(4) NOT NULL DEFAULT '-1',
 
  `track_impressions` tinyint(4) NOT NULL DEFAULT '-1',
 
  `checked_out` int(10) unsigned NOT NULL DEFAULT '0',
 
  `checked_out_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
 
  `publish_up` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
 
  `publish_down` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
 
  `reset` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
 
  `created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
 
  `language` char(7) NOT NULL DEFAULT '',
 
  PRIMARY KEY (`id`),
 
  KEY `idx_state` (`state`),
 
  KEY `idx_own_prefix` (`own_prefix`),
 
  KEY `idx_metakey_prefix` (`metakey_prefix`),
 
  KEY `idx_banner_catid` (`catid`),
 
  KEY `idx_language` (`language`)
 
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
 
 
 
-- --------------------------------------------------------
 
 
 
--
 
-- Table structure for table `jos_banner_clients`
 
--
 
 
 
CREATE TABLE IF NOT EXISTS `jos_banner_clients` (
 
  `id` int(11) NOT NULL AUTO_INCREMENT,
 
  `name` varchar(255) NOT NULL DEFAULT '',
 
  `contact` varchar(255) NOT NULL DEFAULT '',
 
  `email` varchar(255) NOT NULL DEFAULT '',
 
  `extrainfo` text NOT NULL,
 
  `state` tinyint(3) NOT NULL DEFAULT '0',
 
  `checked_out` int(10) unsigned NOT NULL DEFAULT '0',
 
  `checked_out_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
 
  `metakey` text NOT NULL,
 
  `own_prefix` tinyint(4) NOT NULL DEFAULT '0',
 
  `metakey_prefix` varchar(255) NOT NULL DEFAULT '',
 
  `purchase_type` tinyint(4) NOT NULL DEFAULT '-1',
 
  `track_clicks` tinyint(4) NOT NULL DEFAULT '-1',
 
  `track_impressions` tinyint(4) NOT NULL DEFAULT '-1',
 
  PRIMARY KEY (`id`),
 
  KEY `idx_own_prefix` (`own_prefix`),
 
  KEY `idx_metakey_prefix` (`metakey_prefix`)
 
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
 
 
 
-- --------------------------------------------------------
 
 
 
--
 
-- Table structure for table `jos_banner_tracks`
 
--
 
 
 
CREATE TABLE IF NOT EXISTS `jos_banner_tracks` (
 
  `track_date` datetime NOT NULL,
 
  `track_type` int(10) unsigned NOT NULL,
 
  `banner_id` int(10) unsigned NOT NULL,
 
  `count` int(10) unsigned NOT NULL DEFAULT '0',
 
  PRIMARY KEY (`track_date`,`track_type`,`banner_id`),
 
  KEY `idx_track_date` (`track_date`),
 
  KEY `idx_track_type` (`track_type`),
 
  KEY `idx_banner_id` (`banner_id`)
 
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
 
</source>
 
 
 
===Banner reference in Extensions Table===
 
<source lang="sql">INSERT INTO `jos_extensions` VALUES(4, 'com_banners', 'component', 'com_banners', '', 1, 1, 1, 0, '{"legacy":false,"name":"com_banners","type":"component","creationDate":"April 2006","author":"Joomla! Project","copyright":"(C) 2005 - 2012 Open Source Matters. All rights reserved.\\n\\t","authorEmail":"admin@joomla.org","authorUrl":"www.joomla.org","version":"2.5.0","description":"COM_BANNERS_XML_DESCRIPTION","group":""}', '{"purchase_type":"3","track_impressions":"0","track_clicks":"0","metakey_prefix":""}', '', '', 0, '0000-00-00 00:00:00', 0, 0);</source>
 
 
 
===Banner references in Menu Table===
 
<source lang="sql">INSERT INTO `jos_menu` VALUES(2, 'menu', 'com_banners', 'Banners', '', 'Banners', 'index.php?option=com_banners', 'component', 0, 1, 1, 4, 0, 0, '0000-00-00 00:00:00', 0, 0, 'class:banners', 0, '', 1, 10, 0, '*', 1);
 
INSERT INTO `jos_menu` VALUES(3, 'menu', 'com_banners', 'Banners', '', 'Banners/Banners', 'index.php?option=com_banners', 'component', 0, 2, 2, 4, 0, 0, '0000-00-00 00:00:00', 0, 0, 'class:banners', 0, '', 2, 3, 0, '*', 1);
 
INSERT INTO `jos_menu` VALUES(4, 'menu', 'com_banners_categories', 'Categories', '', 'Banners/Categories', 'index.php?option=com_categories&extension=com_banners', 'component', 0, 2, 2, 6, 0, 0, '0000-00-00 00:00:00', 0, 0, 'class:banners-cat', 0, '', 4, 5, 0, '*', 1);
 
INSERT INTO `jos_menu` VALUES(5, 'menu', 'com_banners_clients', 'Clients', '', 'Banners/Clients', 'index.php?option=com_banners&view=clients', 'component', 0, 2, 2, 4, 0, 0, '0000-00-00 00:00:00', 0, 0, 'class:banners-clients', 0, '', 6, 7, 0, '*', 1);
 
INSERT INTO `jos_menu` VALUES(6, 'menu', 'com_banners_tracks', 'Tracks', '', 'Banners/Tracks', 'index.php?option=com_banners&view=tracks', 'component', 0, 2, 2, 4, 0, 0, '0000-00-00 00:00:00', 0, 0, 'class:banners-tracks', 0, '', 8, 9, 0, '*', 1);</source>
 
 
 
== Contacts ==
 
Upload all files & directories under:
 
* /administrator/components/com_contact/
 
* /components/com_contact/
 
 
 
Use phpMyAdmin to run the following SQL statements to recreate the references (replace jos_ with your own table prefix!):
 
=== Contacts reference in Assets table ===
 
<source lang="sql">INSERT INTO `jos_assets` VALUES(7, 1, 13, 16, 1, 'com_contact', 'com_contact', '{"core.admin":{"7":1},"core.manage":{"6":1},"core.create":[],"core.delete":[],"core.edit":[],"core.edit.state":[],"core.edit.own":[]}');
 
INSERT INTO `jos_assets` VALUES(29, 7, 14, 15, 2, 'com_contact.category.4', 'Uncategorised', '{"core.create":[],"core.delete":[],"core.edit":[],"core.edit.state":[],"core.edit.own":[]}');
 
</source>
 
 
 
== Newsfeeds ==
 
Upload all files & directories under:
 
* /administrator/components/com_newsfeeds/
 
* /components/com_newsfeeds/
 
 
 
Use phpMyAdmin to run the following SQL statements to recreate the references (replace jos_ with your own table prefix!):
 
=== Newsfeeds reference in Assets table ===
 
<source lang="sql">INSERT INTO `jos_assets` VALUES(19, 1, 41, 44, 1, 'com_newsfeeds', 'com_newsfeeds', '{"core.admin":{"7":1},"core.manage":{"6":1},"core.create":[],"core.delete":[],"core.edit":[],"core.edit.state":[],"core.edit.own":[]}');
 
INSERT INTO `jos_assets` VALUES(30, 19, 42, 43, 2, 'com_newsfeeds.category.5', 'Uncategorised', '{"core.create":[],"core.delete":[],"core.edit":[],"core.edit.state":[],"core.edit.own":[]}');
 
</source>
 
 
 
== Smart Search ==
 
Upload all files & directories under:
 
 
 
Use phpMyAdmin to run the following SQL statements to recreate the references (replace jos_ with your own table prefix!):
 
=== Smart Search reference in Assets table ===
 
<source lang="sql">INSERT INTO `jos_assets` VALUES(33, 1, 63, 64, 1, 'com_finder', 'com_finder', '{"core.admin":{"7":1},"core.manage":{"6":1}}');</source>
 
 
 
== Weblinks ==
 
Upload all files & directories under:
 
* /administrator/components/com_weblinks/
 
* /components/com_weblinks/
 
 
 
Use phpMyAdmin to run the following SQL statements to recreate the references (replace jos_ with your own table prefix!):
 
=== Weblinks reference in Assets table ===
 
<source lang="sql">INSERT INTO `jos_assets` VALUES(25, 1, 57, 60, 1, 'com_weblinks', 'com_weblinks', '{"core.admin":{"7":1},"core.manage":{"6":1},"core.create":{"3":1},"core.delete":[],"core.edit":{"4":1},"core.edit.state":{"5":1},"core.edit.own":[]}');
 
INSERT INTO `jos_assets` VALUES(31, 25, 58, 59, 2, 'com_weblinks.category.6', 'Uncategorised', '{"core.create":[],"core.delete":[],"core.edit":[],"core.edit.state":[],"core.edit.own":[]}');
 
</source>
 

Latest revision as of 17:09, 26 April 2022

This page has been archived. This page contains information for an unsupported Joomla! version or is no longer relevant. It exists only as a historical reference, it will not be improved and its content may be incomplete and/or contain broken links.

Some Joomla 2.5.x core components (Banners, Contacts, Newsfeeds, Smart Search, and Weblinks) can be deleted via the Back-end: Extensions > Extension Manager > Manage > (select + delete)

Core component installation packages don't exist because it's too much work to maintain, and Joomla 2.5 has a nice feature called "discover".

Note: The following method is recommended:

  1. Upload and merge the contents of a Joomla full package (without /installation/ directory) to the root of your website. If you're comfortable with SSH you can unzip the package and merge it. Otherwise, use an FTP client that lets you do a merge/replace and choose merge for any folder your ftp client asks you about and overwrite for any file it asks you about. Using merge for folders instead of just replace will leave your non Joomla files alone (things not included in the install package) while replacing only the files that are in the package you're uploading with new ones and replacing any missing files. WARNING! if you simply upload and don't merge, you'll overwrite anything installed and likely break your site.
  2. Use Extensions > Extension Manager > Discover to discover & install uninstalled extensions.
  3. The components table structures + the component reference in #__extensions + the component menu items will all be created automatically.
  4. The component reference in #__assets will not be created using "discover": to recreate, use Components > [component name] > [Options] (icon in upper right corner) > Permissions (tab) > [save & close]

If you're doing this to repair a broken upgrade, you'll also want to use the database repair function found in the extensions manager area to fix the database.