Search
Other Articles Field questions
Forum

Ajax filter for Articles Field

Kovacs Peter's Avatar Kovacs Peter
Hello,

I really like the Articles Field plugin, but I have a small issue with it. The site has over 25,000 articles, and the article editor becomes very slow when I use this field.

What do you think? Would it be possible to implement an AJAX-based solution to allow typing and dynamically finding articles? This could be a fast and efficient solution for large websites.
Peter van Westen's Avatar Peter van Westen ADMIN
Articles Field already is loaded via ajax and already has a search feature via typing.

What Joomla and Articles Field version are you using?
Please post a rating at the Joomla! Extensions Directory
Kovacs Peter's Avatar Kovacs Peter
Joomla 5.2.2 and Field Plugin 4.3.2 Pro

The data does load via AJAX, but the spinner is displayed for more than 10–12 seconds before the results appear. Additionally, the browser freezes for a while when I type a word.

I was thinking a remote AJAX source, similar to what Select2 provides: select2.org/data-sources/ajax
Peter van Westen's Avatar Peter van Westen ADMIN
A remote source well outside the scope of Articles Field.
Please post a rating at the Joomla! Extensions Directory
Kovacs Peter's Avatar Kovacs Peter
Okay, I understand. Then I must tell the client that if they have more articles, their editing process will be slower. 🙂
Peter van Westen's Avatar Peter van Westen ADMIN
If you want to disable the articles selection field because there are too many articles, lower the value of the "Maximum List Count" setting in the Regular Labs Library plugin.
Then you will get a simple text area in which you can enter the ids of the articles.
Please post a rating at the Joomla! Extensions Directory
Kovacs Peter's Avatar Kovacs Peter
I was thinking of one more thing: we assign articles only from the last year. As far as I can see, there is a cool feature to filter by categories, tags, language, authors, and custom fields. Would it be possible to add a new filter for the publish date? Like filtering articles from the last X months, so it won’t list the older ones.
Peter van Westen's Avatar Peter van Westen ADMIN
The issue with that would be that if you re-save articles that have older-than-a-year articles selected in the Articles Field, these would then be removed from the selection. That would cause all sorts of unexpected results.
Not something I would consider adding to Articles Field for that reason.

If you don't care about older articles, maybe you don't even want them to appear on the site at all. In that case, you could delete them.
Or move them to a separate archive category. Then you could filter them out via the category filter.
Please post a rating at the Joomla! Extensions Directory
Kovacs Peter's Avatar Kovacs Peter
The issue with that would be that if you re-save articles that have older-than-a-year articles selected in the Articles Field, these would then be removed from the selection. That would cause all sorts of unexpected results.

Almost 🙂 I think t should list the articles filtered by the criteria, merged with the articles that are already selected and stored in the database.

What you describe is a possible issue for the other filters as well. What if I restructure my page and change an article’s category or tag? Or its custom fields? These changes could lead to the same scenario. I know it’s not a frequent thing to modify these for an older article, but listing the filtered articles along with the already selected articles could provide a solution to all these cases.
You can only post on the extension support forum if you have an active subscription and you log in

Buy a Pro subscription