5

Your plugin appears to be written for a very old version of Joomla! The event in current versions is onContentBeforeSave. You are also missing $context argument. It's a good idea to check for context to make sure that you're modifying the correct content type (e.g. article). public function onContentBeforeSave($context, $article, $isNew) { if ($context !...


3

Got to; content > articles > options > category tab > No Articles Message > hide / show


3

I would have preferred to just suggest some touch ups to your snippet, but there is too much for me to address in your answer as a comment and I'd rather explain fully. Instead, I'll post this new answer which will review and clean up your assumed-working coding attempt for the benefit of you and future researchers. You are declaring $images = json_decode($...


3

I had this issue now a second time on another system and tried to fix it the same way. I've recognized, that this could be fixed easier: Setup a new local Sytem of Joomla with the last running Joomla version (which was 3.9.3 in this case) Exported the database from the live system and imported it to my local Joomla Repaired all database failures with the ...


3

You would want to put this as a template override for com_content. Depending on whether you want it to appear on the category page or single article, the file would go /templates/TEMPLATE_NAME/html/com_content/category/blog_item.php /templates/TEMPLATE_NAME/html/com_content/article/default.php I would make a clone of existing view and then add code below ...


3

If you look at the page source of your site are the meta tags showing correctly? Assuming that they are, then my answer is as follows. Google will often provide its own metadescriptions, often different ones depending on the search and the searcher. It will use the one you provide if it is unique enough and relevant enough and is suitable for the search ...


2

With Joomla core you need to setup a menu structure that will correspond to what you want to achieve with your URLs. Menus are important in Joomla. From the example of the URLs in your question - it seems like you have created a menu item for the article1. If you want all articles of that category (cat1) to be reachable under the cat1/article1,art2,art3 ...


2

I had the same problem on twitter. I was trying to add my link picture just as facebook does automatically but had to investigate the CARD Validator here https://cards-dev.twitter.com/validator ...Tthe way I have it working on Joomla 3.9.11 is adding this code in the head of my template default.php ... I was able to properly add the title, the description ...


2

Since Joomla 3.9.x you can search the content of articles in the back-end of the website by prefixing your search term with "CONTENT:" in the search field. If this does not help, you could temporarily disable search engine friendly urls in Global Configuration so that the links in the search results show you which component is generating the content.


2

First of all, you won't find the page in your menus: the ID in front of /14-get-involved/ indicates that there's no menu item for that page. Otherwise Joomla's SEF functionality would have changed it to /get-involved/ Do you have a category called get-involved? Does it contain any articles? Are you using none-core extensions like a Page Builder component? ...


2

The code required to extract the first name of the currently logged in user is fairly simple. Here's an example: <?php $user = JFactory::getUser(); if (!$user->guest) { echo strtok($user->name, ' '); } ?> Using the free or paid version of Sourcerer you could insert the code directly into an article as follows: {source}<?php $user =...


2

I don't see set() in the JTable docs. You also need to remember to re-encode the full column value before storing. The following is an untested snippet. $db = JFactory::getDbo(); $query = $db->getQuery(true) ->select(db->qn("item_id")) ->from($db->qn("#__fields_values")); // build all of the non-changing clauses for ...


1

The article options are held in json-encoded format in the attribs field in the database, so that is what you should set, eg: $data["attribs"] = array("show_title" => 0, "show_tags" => 0); The names of the options can be found from the edit article xml form definition in administrator/components/com_content/models/forms/article.xml. The Content ...


1

Disable No Articles Message option in the menu item or in com_content configuration.


1

This is handled by System - SEF plugin. It will not work with page content added using JavaScript. You'll have to handle this in your code.


1

Administrator side's ContentModelArticles does not support filtering by ID. ContentModelArticle does support it. The state property name is article.id: $model->setState('article.id', $articleId); If this is a frontend module you might want to use the frontend articles model: // Register frontend model classes. JModelLegacy::addIncludePath(JPATH_SITE ....


1

The free AddToAny Share Buttons has an option for sharing the link but you might need to customise the styling to your requirements. A plugin and a module are included.


1

You could create a plugin which was triggered by an event such as onContentPrepare, like this: <?php defined( '_JEXEC' ) or die; class plgContentHits extends JPlugin { public function onContentPrepare($context, &$article, &$params, $page = 0) { $parts = explode(".", $context); if (isset($parts[0]) && $parts[0] ==...


1

I suspect it's because you are running the code under a Joomla user who doesn't have permission to set values for that 'excluded' custom field. Within the Joomla field model code for setFieldValue() there's a call to FieldsHelper::canEditFieldValue($field) and if the Edit Custom Field Value permission for your user's group is not set to Allowed then the ...


1

It is basically a LEFT JOIN to relate the tables and WS_CONCAT() calls to prepare the output strings within the SQL (no extra php handling of the result set). If EVERY article has a date value in the fields_values table, then you can use innerJoin(); if you use innerJoin() and there is no related row in the joined table for a specific article, then that ...


1

The solution to my question. I think is valid: <?php $images = json_decode($item->images); ?> <span itemprop="image" itemscope itemtype="https://schema.org/ImageObject"> <link itemprop="url" href="<?php // Create new DOMDocument object. $dom = new DOMDOcument; // Load article text into DOMDocument. $dom->loadHTML($item->...


1

Try this workaround below, by calling jquery.framework from the article. It should override jquery.framework call that comes from your template so then jquery will be called before your script. {source} <?php JHtml::_('jquery.framework'); $doc = JFactory::getDocument(); $doc->addStyleSheet('mycode/css/article_1.css'); $doc->...


1

It’s a jQuery conflict (more like noConflict issue). You should start and wrap your script for example like: jQuery.noConflict(); (function( $ ) { // if you want to use $ $(function() { // More code using $ as alias to jQuery }); })(jQuery); Or redefine jQuery like: var $j = jQuery.noConflict(); // $j is now an alias to the jQuery function; ...


1

A solution could be possible using Community Builder extension and it's plugin CB Content Bot.


1

I believe the fields are only available to the component for which they were created, being an extension of that component. If you think about, if you add {field 1} to an article, how does the article know that you mean field 1 from com_contacts or any other component. Maybe one day custom fields might advance to allow {com_contacts:field 1} which would ...


1

go to /administrator/index.php?option=com_installer&view=database click on fix


1

There seem to be a couple of Joomla modules which allow you to search for text within the same page using JavaScript. Not sure if this is what you are looking for https://jdev.l-it.co.za/products/in-page-search-term-highlighter This module basically lets you search for content within the same page you are on, similar to the CTRL+F browser search feature.


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