Search
Other Articles Anywhere questions
Forum

Migrated to Joomla 4 and the latest Articles Anywhere J4 but pages just time out (504)

Collin Lafrance's Avatar Collin Lafrance
Hello,

I updated my test site to J4 and the latest Articles Anywhere J4 version, yet my pages are timing out that have any Articles Anywhere code on them.

I attached my code from one article. This is the code from when I Was on Joomla 3. I reviewed your migration and changes pages but it seems like everything should be fine as is. I also tried the Articles Anywhere button to do some comparison with what it would generate and it seems to be mostly the same. I really can't figure out what I am missing. It's really to display articles based on them being in the specific category, and having a custom field value of 1, as well as the custom field date value of today. Ordered by a custom field time value. No custom fields have changed name, or any categories either. Based on your syntax migration instructions, it seems everything is in order but I'm sure there is something wrong, I just can't spot it.

If I do a simple ARticles Anywhere code line, it comes up fine. Could you take a look if there is something jumping out at you?

Thank you.
{articles category="Media Advisory" type-of-media-advisory="1" date="date('today')" OR category="Media Advisory" type-of-media-advisory="1" date-2="date('today')" OR category="Media Advisory" type-of-media-advisory="1" date-3="date('today')" OR category="Media Advisory" type-of-media-advisory="1" date-4="date('today')" OR category="Media Advisory" type-of-media-advisory="1" date-5="date('today')" OR category="Media Advisory" type-of-media-advisory="1" date-6="date('today')" OR category="Media Advisory" type-of-media-advisory="1" date-7="date('today')" OR category="Media Advisory" type-of-media-advisory="1" date-8="date('today')" OR category="Media Advisory" type-of-media-advisory="2" date="date('today')" OR category="Media Advisory" type-of-media-advisory="2" date-2="date('today')" OR category="Media Advisory" type-of-media-advisory="2" date-3="date('today')" OR category="Media Advisory" type-of-media-advisory="2" date-4="date('today')" OR category="Media Advisory" type-of-media-advisory="2" date-5="date('today')" OR category="Media Advisory" type-of-media-advisory="2" date-6="date('today')" OR category="Media Advisory" type-of-media-advisory="2" date-7="date('today')" OR category="Media Advisory" type-of-media-advisory="2" date-8="date('today')" ordering="date-nf1 ASC" empty="<hr>No events scheduled"}
<hr />
<p style="color:red"><strong>[status-of-media-advisory]</strong></p>
<b> [location-date-time]</b><br />
<br />
<b>[link][title][/link]</b><br />
[text]<br />
{if virtuallink}[virtuallink]<br />
{/if}{/articles}
Peter van Westen's Avatar Peter van Westen ADMIN
Wow, you have a LOT of filters in there. The way that is built up, makes me wonder wether there is not a more serious underlying issue with how you have set things up. For instance, why the need for 8 different date fields.

One thing you can do to half the amount of "OR" groups in there is use:
type-of-media-advisory="1,2"
Please post a rating at the Joomla! Extensions Directory
Collin Lafrance's Avatar Collin Lafrance
Can I combine the date fields into one? Ultimately I am trying to find anything that matches the date set in any of the 8 fields. (we have several fields as the dates aren't continuous so a date range wouldn't work).

It's worked fine for the past 3 years on our site, until Joomla 4.
Peter van Westen's Avatar Peter van Westen ADMIN
The Joomla 4 version works completely different under the hood.
In most cases it is a lot smarter and lighter than the J3 version.
It also can do a whole lot more.
Please post a rating at the Joomla! Extensions Directory
Collin Lafrance's Avatar Collin Lafrance
So I streamlined it by doing what you suggested, using a subfield, with a repeating date field inside it.
So now I ended up with this.
{articles category="Media Advisory" type-of-media-advisory="1,2" packagedates="date('today')" ordering="date-nf1 ASC"}{/articles}

Still getting the loading, loading until it times out with Error 504. If I remove that line, the page loads fine.

Based on the Articles Anywhere Joomla 4 documentation, I believe my syntax is correct, so still unsure what is going on.

If I do trial and error, it does work if I take everything out and just leave the category and type-of-media-advisory="1,2". The rest seems to make it timeout.

Interestingly, other than the category, everything else is a custom field. Sorry, I'm really at a loss as to what I am doing wrong.
Peter van Westen's Avatar Peter van Westen ADMIN
Can you give me (super) admin and (s)ftp access so I can take a look?
And tell me on what url I can see/reproduce the issue.
You can use the 'Confidential information' button in the forum editor to hide sensitive information.
Please post a rating at the Joomla! Extensions Directory
Collin Lafrance's Avatar Collin Lafrance
Confidential information:
(hidden)


Thank you.
Peter van Westen's Avatar Peter van Westen ADMIN
So things are falling apart in the database query when doing certain joins on the fields tables.
This leads me to believe there are some missing or weird indexes on your database tables.

Can you give me database (PhpMyAdmin) access so I can take a look over there and do some query testing?
Please post a rating at the Joomla! Extensions Directory
Collin Lafrance's Avatar Collin Lafrance
Hi Peter.

I added details to access phpmyadmin for you.

Thank you.

Just to let you know, from the update log to Joomla 4, it seemed to proceed normally and complete without issue, and Articles Anywhere worked fine on Joomla 3.

Confidential information:
(hidden)
Peter van Westen's Avatar Peter van Westen ADMIN
This is down to a few specific combinations of circumstances.
I will have to do some recoding of how queries are being built up.
Won't be a quick fix ?
Please post a rating at the Joomla! Extensions Directory
Collin Lafrance's Avatar Collin Lafrance
Thanks for the update. That's really unfortunate.

From your tests, can you say if it is another extension or something that I can do that would fix the issue, or its really a set of issues that are causing this outside of my control?
Peter van Westen's Avatar Peter van Westen ADMIN
No, it is down to the way the Articles Anywhere internals work and not (correctly) set up to deal with certain combinations of filters.
Please post a rating at the Joomla! Extensions Directory
Peter van Westen's Avatar Peter van Westen ADMIN
I'll probably have a fix before the end of the week...
Please post a rating at the Joomla! Extensions Directory
Collin Lafrance's Avatar Collin Lafrance
Peter as I always say you are a miracle worker. That's perfectly fine don't worry.

When other developers say it won't be a quick fix, it means a few months (or it will be a while before we forget).

So thank you again and always for your professionalism and fantastic work.
Peter van Westen's Avatar Peter van Westen ADMIN
A quick fix for me means within a day, usually the hour.
Please post a rating at the Joomla! Extensions Directory
Peter van Westen's Avatar Peter van Westen ADMIN
Please try the latest development version from:
regularlabs.com/development-releases
Please post a rating at the Joomla! Extensions Directory
Collin Lafrance's Avatar Collin Lafrance
Hi Peter, I installed the new development version. It no longer times out however it doesn't pop any results. For example, today there should be at least one article showing on the linked page, based on the dates in the custom fields. I tried creating a second with today's date and still nothing. Other pages that should show articles aren't showing anything either.

For example, Article ID:92238 should be displaying since the date field matches today's date.
Collin Lafrance's Avatar Collin Lafrance
I've been doing some more testing.
{articles category="Media Advisory" type-of-media-advisory="1" date="date('today')"}[title]{/articles}

Just using this simple code so the one category, and two custom fields (one ratio button and the other a date string), I get no results, despite two articles being set accordingly.

I've been doing some trial and error and it seems like this part seems to make it yield no results.
date="date('today')"

From the documentation, it seems like it should still work, but maybe I am mistaken.

Also tried making just a text custom field and putting in the date manually Eg. 2022-10-19, and still no results.
Peter van Westen's Avatar Peter van Westen ADMIN
I'll look into this tomorrow…
Please post a rating at the Joomla! Extensions Directory
Peter van Westen's Avatar Peter van Westen ADMIN
Looks like there is something weird on your setup...
when entering '2022-10-20' in the field, it saves as '2022-10-19'.
Something wrong with the timezone setting?
Please post a rating at the Joomla! Extensions Directory
You can only post on the extension support forum if you have an active subscription and you log in

Buy a Pro subscription