8

The development strategy for the Joomla CMS is currently being revised. There is going to be at least a 3.3 and a 3.4 and probably more incremental minor versions at irregular intervals. This is different from the previous pattern where we'd go 3.5 and then 4.0 six months apart. It's not known when 4.0 will be released but my guess is it's not going to be ...


4

Joomla 3.9.x has a file public_html/libraries/classmap.php that contains all the old style Class names, and the new replacements. E.g. JLoader::registerAlias('JFactory', '\\Joomla\\CMS\\Factory', '5.0'); JFactory is indeed deprecated. You can rewrite // JFactory is deprecated $db = JFactory::getDbo(); to // Put at the top of your file use Joomla\CMS\...


4

1) JHtml is an alias for Joomla\CMS\HTML\HTMLHelper class. You'll have to start using the real class sooner or later because the alias will not exist in Joomla! 5.0. To use the real class you have to either import it: use Joomla\CMS\HTML\HTMLHelper; HTMLHelper::doSomething(); HTMLHelper::doSomethingElse(); Or use fully qualified class name: \Joomla\CMS\...


3

I’m answering the question because it is obviously not a Joomla 4 core bug but a mistake in the developer’s coding and the problem would be the same in Joomla 3 too. If you try to use a Joomla core class in your code you have to include that class on the top of the file otherwise Joomla does not know what it needs to use, so: use Joomla\CMS\Date\Date; ...


3

In Joomla 4 we've completely removed the Mootools library and any API functions for it. If you'd like to utilise a modal, you can use JHtmlBootstrap::renderModal which is currently a wrapper for Bootstraps JS modal component, however we're rewriting the main components as custom elements. Here is an example for you to build on top of: // Add this to the ...


3

To get Menu item in Joomla 4 you can get the Item From the Factory like use Joomla\CMS\Factory; $menu = Factory::getApplication()->getMenu(); $active = $menu->getActive(); getActive() will give the curent Menu Item, you can use other methods getDefault() or getItem() as per your need. You can get Menu items with menu type as $items = $menu->...


3

You probably work with Joomla 4 (alpha) as beta does not seem to be yet available. The plugins in Joomla 4 (alpha 7 latest) are at administrator->system->manage->plugins.


2

Your comment led me to doubt my belief that getDbo() is alive and well. I have tested my below techniques on Joomla3.9.5 and there are no problems. Original answer... Based on this documentation: https://api.joomla.org/cms-3/classes/Joomla.CMS.Factory.html#method_getDbo Returns the global \JDatabaseDriver object, only creating it if it doesn't already ...


2

Either, include that helper class on the top of your default.php like: defined('_JEXEC') or die; use Joomla\Module\ArticlesLatest\Site\Helper\ArticlesLatestHelper; Then you can use that class within your default.php file Or standardly define your own variable in mod_articles_latest.php like: $myStuffHere = ArticlesLatestHelper::myCustomFunction($myparam)...


2

The call method has been marked as removed for Joomla 4.0, as it's simply a wrapper for get(). You don't need to manually store the cache as this is done within the get() method: https://github.com/joomla/joomla-cms/blob/4.0-dev/libraries/src/Cache/Controller/CallbackController.php#L139


2

Finally figured it out - my problem is a missing placeholder in the tmpl (which was not required for JSubMenuHelper). Added this to my tmpl/default.php, now it works: <div id="j-sidebar-container" class="span2"> <?php echo $this->sidebar; ?> </div> The submenu in banners I was wondering about is actually done via the manifest file, ...


1

Ok, this is a bit hack-ish, but it can work: Set article0 as a category itself, not as an article. Use the Category Description field to hold what you currently have as the article text. Set article1-100 as articles in the category. That way /article0 is the category (Blog or List) page, and the rest are /article0/articlex as articles within that category....


1

use Joomla\CMS\Factory; Factory::getApplication()->triggerEvent('onBeforeRenderToolbar', array($settings)); This method can be used in 3.x too.


1

Sets a value to $hascontent if either of the conditions on the right side is true. The conditions appear to be is the module empty or is customContent set, i.e. not null. If you want to find out what the value is that is set then use the following to display it. echo print_r($hascontent); or echo var_dump($hascontent);


1

The view is created from the code in ..\administrator\components\com_menus\views\item\tmpl starting with edit.php and your particular tab would be edit_modules.php I got there by decoding your URL, administrator/index.php?option=com_menus&view=item&client_id=0&layout=edit&id=101 and knowing it would be under /components and /tmpl It does ...


1

To implement Joomla standard namespacing in a plugin, follow these steps: First, declare extension's namespace in manifest file: <namespace>Joomla\Plugin\EditorsXtd\Vimeo</namespace> If you are editing files on site, you need to delete libraries/autoload_ps4.php file so it can regenerated. If you update the plugin using extension manager, this ...


1

You will need to download and install Composer first. Once done, open your terminal, navigate to the root of your Joomla installtion, and type in the following command: composer install You'll then need to install NodeJS. Be sure to get the long term release 10.x. Once installed, in the same terminal, run the following command: npm i These commands ...


1

Your issue comes solely from confusion about Joomla! versions. These facts should clear the air: \Joomla\CMS\Factory::getDbo() is deprecated in 4.0 and will be removed in 5.0. It is alive and well in 3.9. \Joomla\CMS\Factory::getContainer() doesn't exist in 3.9 as it was only added in 4.0. The code you were looking at is from 4.0, not from 3.9.5. In ...


1

define('_JEXEC', 1); define('JPATH_BASE', __DIR__ . '/../../..'); require_once JPATH_BASE . '/includes/defines.php'; require_once JPATH_BASE . '/includes/framework.php'; // Boot the DI container. $container = \Joomla\CMS\Factory::getContainer(); // Alias the session service key to the web session service. $container->alias(\Joomla\Session\...


1

As far as I know there is no official information about Joomla 4.x. But there is Joomla CMS Distributions project which potentially could be the base of Joomla 4.x.


Only top voted, non community-wiki answers of a minimum length are eligible