[SOLVED] Popup error message on front end

I'm a bit baffled...

I have an app I built last year which was working perfectly well. Now I'm attempting to create a new record which uses (amongst other things) two databasejoins. The first works ok but when I try to select from the second DBJ I get a popup error message at the top of the page and I can't get any further:
upload_2022-2-5_15-22-45.png

The really strange thing is this works perfectly well in the back end. It also works perfectly well in my test site which has exactly the same setup as in my live site, including the same version of the same template. I've cleared my browser and Joomla cache more than once and tried disabling Admin Tools but all to no avail.

Anyone got any ideas what may be causing this strange behaviour? Or even what sort of thing would trigger this type of (unhelpful) error message?
 

Attachments

  • upload_2022-2-5_15-20-7.png
    upload_2022-2-5_15-20-7.png
    32.1 KB · Views: 45
When I check the Console, this pops up at the same time as the Error message:

jquery.min.js?5be6d99a0d6d76b91ad27040d1587a53:2
POST https://www.walmsleychurchaods.co.uk/members-area/index.php 404 (Not Found)

and when I click on the down arrow, I see (amongst other things):
lookUp @ autofill-min.js:3
e @ autofill-min.js:3
(anonymous) @ databasejoin-min.js:3

So does this indicate a problem with one of the two autofill plugins on the form? And, if so, why does it work OK in the back end? And on my test site?

Still baffled...
 
Try to set "Allow Fabrik debug"=Debug JS in Fabrik Options [Debugging].
Then it will run the uncompressed databasejoin and autofill.js and may show some more informative line numbers.
 
I set Allow Fabrik debug to Debug JS. I don't see anything on the page and adding "&fabrikdebug=1" to the page URL only produces a 404 message. Should I see more information in the Console? I'm only seeing a slight difference:
lookUp @ autofill.js:191
doLookup @ autofill.js:88
(anonymous) @ databasejoin.js:1042

When I unpublish both autofill form plugins, the error no longer appears and I can continue. But unpublishing only one - either one - still showed the error. If there's a problem with the autofill plugins, why is it OK in the back end? And why has it been OK until now? :confused:
 
Hi @troester

There are no redirects in that form but there is an email plugin. However it was disabled so I doubt that was the culprit.
Looking at line 191 in autofill.js it says this:
jQuery.ajax({
url : 'index.php',
method : 'post',
dataType: 'json',

Could that be the reason for the "POST" message?

Do you suspect the problem is with the .htaccess file? The last time I successfully created a record using this form was 18th October 2021. The only files dated since then (looking at my web host file manager) are htaccess.txt and webconfig.txt. Anyway, I've just created a new .htaccess file with Admin Tools using all the recommended settings and the instructions in the Fabrik wiki for 3rd party compatibility. I still get the same error message.
:(
 
There are no redirects in that form
I thought of redirects or settings in the .htaccess.
Email form plugin should run only after form save, so yes, I also think this isn't involved.

It's running in the backend and it mentions a 404 URL in the frontend:
Do you have SEF enabled?
Did you try with an other template (Protostar)?
 
I thought of redirects or settings in the .htaccess.
I've looked through the new .htaccess file and I can't see any lines which specifically say "Redirect" (although I don't really know what I'm looking for).

Did you try with an other template (Protostar)?
No, because I uninstalled Protostar years ago (before I started using Fabrik) as I thought I would never use that old thing!:oops:

Do you have SEF enabled?
Yes...
upload_2022-2-6_13-59-25.png

I set it to "No" and the form worked perfectly! Hooray!! :):):)
Thank you SO MUCH for sorting that out for me! I was beginning to think my whole app was a waste of time!!

Nevertheless, it would be interesting to know what changed to make this stop working and if there is a way I could fix it properly so that SEF could be enabled again.
 
The really strange thing is this works perfectly well in the back end. It also works perfectly well in my test site which has exactly the same setup as in my live site, including the same version of the same template.
Are your live and test sites on the same server?
If they're on different servers: The server with your live site may require a small tweak in Joomla's .htaccess for SEF and URL Rewriting to work properly. I've experienced with some of my clients that it's often the case especially with "mass hosters" such as 1&1 and some cheap shared hosting plans elsewhere.

You may try the following:
1. In Joomla's global config, have both SED URLs and URL Rewriting set to yes.
2. In .htaccess, find the line
Code:
Options +FollowSymlinks
and comment it out by changing it to
Code:
# Options +FollowSymlinks
(Note the # at the beginning of the line.)

Then try again, this may fix your issue while still enabling SEF, getting rid of "/index.php", etc.
 
Thank you @troester and @lousyfool for your time and excellent suggestions.

@troester
Is it working with SEF on but URL Rewriting off?
Yes, it works and I'll probably leave it like this now.
Are you on a subdirectory?
No. I have a sub-domain but it's not related to this form or anywhere near the URL mentioned in the error.
Any "live_site" setting in configuration.php?
No, just ''

@lousyfool
Are your live and test sites on the same server?
No. Completely different web hosts. (Both are "cheap shared hosting plans" as you say.)
In .htaccess, find the line "Options +FollowSymlinks"
Strangely, I can't find that line anywhere in my .htaccess file. I did find it in the htaccess.txt file and commented it out with a # at the beginning of the line but it didn't make any difference.

Thanks again to both of you for your help on this. I'm going to leave it working with SEF on and URL Rewriting off. :)
 
Strangely, I can't find that line anywhere in my .htaccess file.
Well, then your current .htaccess is not the one coming with Joomla, it's missing all the good Joomla stuff, and it's no wonder that you can't get URL Rewriting to work or, with it set to "yes", might run into problems on the live server with the clone of your test site.

I did find it in the htaccess.txt file....
... which is the htaccess coming with Joomla, you bet. Hint: in Joomla's global config, read the tooltip for the URL Rewriting switch...

However, not knowing what's in your .htaccess (the one without .txt = the one that's actually being used), and you not being familiar with this, it'll likely require a long post of instructions here.
So, if you can live without URL Rewriting and with "/index.php" in your URLs etc, then leave it as is. Otherwise better learn about .htaccess with Joomla, or hire someone who knows what they're doing.
 
P.S. the current .htaccess is one created by Admin Tools. Is this a bad thing?

I’ll read up on .htaccess files in one of my Joomla books.
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top