joomla-cms icon indicating copy to clipboard operation
joomla-cms copied to clipboard

[5.4] Banner module: get article keywords form article

Open chmst opened this issue 8 months ago • 7 comments

Pull Request for Issue #45368 .

Summary of Changes

In J3 Joomla displayed meta keywords of an article <meta name="keywords" content=".." This was removed in J4. This PR gets keywords from the article itself.

Testing Instructions

You need: some banners with different keywords at least one article with different keywords a bannermodule with (see #45368 ),

Actual result BEFORE applying this Pull Request

When the Article ist displayed, no banner is found

Expected result AFTER applying this Pull

When the article is displayed banners are shown if keywords match.

Note: This is very old and the whole banner module could be improved. But this is not in scope of the PR.

Link to documentations

Please select:

  • [ ] Documentation link for docs.joomla.org:

  • [x] No documentation changes for docs.joomla.org needed

  • [ ] Pull Request link for manual.joomla.org:

  • [x] No documentation changes for manual.joomla.org needed

chmst avatar Apr 26 '25 08:04 chmst

if it is really true that the banner keywords stuff has not worked at all since the release of j4.0 several years ago and it is only just being reported (and fixed) now maybe thats a great indicator that the better fix is to complete the removal of this

brianteeman avatar Apr 26 '25 08:04 brianteeman

What do you mean with "of this"? The banner component is very useful, but probably everyone uses a template override of the module.

chmst avatar Apr 26 '25 08:04 chmst

i agree the banner module is useful i was just referring to the related keywords part

brianteeman avatar Apr 26 '25 08:04 brianteeman

In J3 Joomla displayed meta keywords of an article <meta name="keywords" content=".." This was removed in J4. This PR gets keywords from the article itself.

this is what happens when someone reads another tweet from a Google employee about "keywords" no longer being a ranking factor in Google Search.

Google is not the only search engine that exists in our world, there is also an internal "Smart Search" engine in Joomla that could also rely on "keywords", there are various 3rd-party search solutions, there are also A.I. bots that crawl the content of websites.

Removing "keywords" was a big mistake, like many things that have been done by the Joomla team over the past years, when the impulsiveness and signs of panic of some members got the better of their senses!

"SOMEONE ON TWITTER FROM GOOGLE WROTE THAT KEYWORDS ARE NO LONGER USED! WE NEED TO REMOVE THEM EVERYWHERE IMMEDIATELY!!!" I'm ashamed that I use Joomla for my websites when people like this decide what should be in the CMS core and what should not!

One strategic mistake after another, one strategic mistake after another!!! JED had 8000 extensions compatible with Joomla 3 and what do we have now? Only 2000 extensions are fully compatible with Joomla 5 at the end of Joomla 5 development, all this was the result of numerous strategic mistakes by the team that runs the Joomla core!

You don't even want to listen to anyone and make any decisions with a team of several people, while your CMS is used by hundreds of thousands of webmasters who have from very small personal blogs to large web portals and online stores!

Perhaps it is worth creating a poll on Joomla.org before removing this or that feature from the core of the CMS???

universewrld avatar Apr 29 '25 10:04 universewrld

Set to draft

chmst avatar May 07 '25 10:05 chmst

I have tested this item :red_circle: unsuccessfully on 865b6025bf6863cb3e976247aae61fc5a8bdb8a9

Without the patch applied I get an empty banner module. With the patch applied I get a The requested page can't be found. error:

     0 __clone method called on non-object 

 # 	Function 	Location
1 	() 	JROOT/components/com_content/src/Model/ArticleModel.php:229
2 	Joomla\Component\Content\Site\Model\ArticleModel->getItem() 	JROOT/modules/mod_banners/src/Helper/BannersHelper.php:56
3 	Joomla\Module\Banners\Site\Helper\BannersHelper->getBanners() 	JROOT/modules/mod_banners/src/Dispatcher/Dispatcher.php:46
```<hr /><sub>This comment was created with the <a href="https://github.com/joomla/jissues">J!Tracker Application</a> at <a href="https://issues.joomla.org/tracker/joomla-cms/45396">issues.joomla.org/tracker/joomla-cms/45396</a>.</sub>

ceford avatar May 26 '25 14:05 ceford

This pull request has been automatically rebased to 5.4-dev.

HLeithner avatar Oct 15 '25 17:10 HLeithner