4

JControllerLegacy::getInstance() caches the first controller instance so you're actually getting an instance of your component's controller rather than Content controller. You can skip the controller and get the model directly instead: JModelLegacy::addIncludePath(JPATH_SITE . '/components/com_content/models', 'ContentModel'); $model = JModelLegacy::...


3

Besides the class name of the plugin as it should be formed like ([Plg][Plugin group name][Plugin name]), thus: class PlgAPIWDTOptions extends ApiPlugin It could also make your life easier if you just used small letters in your plugin's name instead of capital letters. So I would call your plugin: plg_api_wdtoptions and your XML correctly should look like ...


3

Yes, it is possible. I had not used this component before, so I installed it in a test environment and confirmed it works. Here are the steps I went through: Create a new user under the Joomla! user group named 'Manager' In the ProFiles component, navigate to 'Root folders & rights' > 'Rights' > 'Manager', and set the values to 'Allowed' Login as ...


2

Have you tried JTable? $category = JTable::getInstance('category'); $category->load($catid); echo $category->title; I'm not 100% sure that the above is totally correct. It might be 'categories' rather than 'category'.


2

So to get it from global configuration set in configuration.php from anywhere within Joomla component, plugins, modules and templates you would use: $config = JFactory::getConfig(); $siteName = $config->get('sitename', 'No Site Name Specified'); OR $siteName = JFactory::getConfig()->get('sitename', 'No Site Name Specified'); You can also use name ...


2

My approach would be to update your code to move away from JModelLegacy and by placing the addIncludePath in the subcontroller using the following lines. mycomponent/controller/messages.php Use Joomla\CMS\MVC\Model\BaseDatabaseModel; . . . BaseDatabaseModel::addIncludePath(JPATH_SITE . '/components/com_mycomponent/models'); $this->msgsModel = ...


2

save() calls store(). Store() works like this: If a primary key value is set the row with that primary key value will be updated with the instance property values. If no primary key value is set a new row will be inserted into the database with the properties from the Table instance. Please check, if the primary key of the database table is set in your $data ...


2

It is doubtful it may work; and even if it did, you risk other issues. Components often use constants and loaders that would not work outside the component itself, such as JPATH_COMPONENT. I see the main risk in the assets, which will be created by Joomla referencing your calling component (the social login component) instead of the called component (Easy ...


2

You may get an error like this: Call to a member function load() on boolean That mean you need to add JTable::addIncludePath also Admin Model: function getModelAdmin($component, $name = 'Custom', $prefix = 'CustomModel') { JTable::addIncludePath(JPATH_ADMINISTRATOR . '/components/' . $component . '/tables', $prefix); JModelLegacy::addIncludePath(...


2

Components in J4 use a service-based approach which, in theory, should allow any naming convention. Although for that you'd have to write your own factories. But if you want to follow same conventions as Joomla core components, start by declaring a namespace in the component's manifest file. The namespace should be in this form: [Vendor]\Component\[Component ...


1

Did you have a look at the Joomla code itself on Github too? https://github.com/joomla/joomla-cms/tree/4.0-dev When I take a look at the php files in the tmpl directories of components and modules I see the following setup for classNames. modules => mod-modulenmame components => com-componentname For instance com_contact. The className for a single ...


1

The component id may not be available yet; you might be able to retrieve it from the db, I did find my own extension in the extensions table at this step but haven't tried; that seems overkill anyways. Just add the menu and submenu items in the xml of the component, in the administration section, at the same level as files and folders something like this: &...


1

Joomla has at least some of the required functionality such as custom fields and other features can be added using third party extensions. There is at least one extension in the Joomla Extensions Directory, SP Movie Database to make it easy to create a movie database but it may not have all the features you require (e.g. front end access for website visitors ...


1

You should think of cURL as its own separate browser. It has no ties to IE, Firefox, Chrome, or whatever browser you use. Just like Firefox has its own cookies and IE has its own cookies, cURL can also be enabled with cookies, but it needs a file to store the cookie data in. This is specified with the CURLOPT_COOKIEFILE and CURLOPT_COOKIEJAR options. The ...


1

I found the solution. In the administrator folder component was the component saved. There was te install.xml file. I checked the file and made the structure described there, after that I could install. I hope this is of value for someone else.


1

Open your user element. From left menu open List view settings->tab List settings. There have a field Custom link. Read label tooltip. Place in field your link to Easysocial user. Replace user id with {rowid}.


1

First of all, you're using different file structure and class naming conventions than Joomla! core. This won't work without rewriting related methods such as controller's getView(). That said, using standard naming conventions, I was able to get this to work by setting base_path option when fetching the controller in component's entry file: $controller = ...


1

Let me try a third solution: use Joomla\CMS\Factory; ... public function display($cachable = false, $urlparams = array()) { $user = Factory::getUser(); if ($user->guest) { $this->setRedirect(JRoute::_('index.php?option=com_users&view=login&return=' . base64_encode(JUri::current()), "You must be logged in to view this ...


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