Form Plugin: Autofill not firing

Ninpo

Member
The latest version of the Autofill form plugin, from git hub, seems to be not working. Here is how to duplicate;

1. Install a fresh copy of Joomla.
2. Install the latest Fabrik package from http://fabrikar.com/download?downloads___type=Component
3. Update the Fabrik install with the version on github using the instructions from http://fabrikar.com/forums/index.php?wiki/update-from-github/
4. Create a list called "Joomla Users" and link it to the existing "users table" instead of creating a new table.
5. Create a list called "Profiles".
6. Create 3 new elements in the "Profiles" list;
A. User: plugin = databasejoin, Render = Dropdown, Table = "Users", Value = ID, Label = Name
B. FullName: Field
C. Email: Field​
7. Attach the Autofill plugin to the "Profiles" form and set the values;
A. Published = Yes
B. In = Both
C. On = Both
D. Data = Site Database
E. List = Joomla Users
F. Lookup Field = ID
G. Field to Observe = User
H. Map Data = {"gh0t1_users___name":"profiles___fullname","gh0t1_users___email":"profiles___email"}
I. I did not set anything in Options except for "Autofill Confirmation" = No​
8. In the Joomla Admin Side, click on "View Data" from either the Profile Form or Profile List.
9. Click "Add" and then select a user from the dropdown. The other 2 fields never get populated. Also, if "Autofill Confirmation" is set to yes, this also never fires.

One interesting note, is that if I do not update Fabrik from Github and just use the base installation and I use an earlier copy of Autofill, "from December", everything works as expected and Autofill populates the mapped fields.

I took a brief look at it with Firebug, and it appears that the autofill-min.js file never gets loaded or attached. If I set a breakpoint anywhere in it, even on init or setup, it never breaks. But if I do the same breakpoint on the earlier version of Fabrik and Autofill, the breakpoint always gets triggered.

I initially did this test on a backup of my site and it was not functioning. So to rule out any potential conflicts, I repeated my test on a fresh install of Joomla in a MAMP sandbox.

I tested this with Safari, Chrome and Firefox with the same results in all 3 of those browsers.

The github branch that I pulled from to do the update was the "origin/Joomla3" branch.
 
Last edited:
I don't have that exact setup, but very similar, and works OK for me.

Can you point me at your page.

-- hugh
 
I have taken an akeeba backup of the site and compressed it. I have put that file on one of my sites. Do you want me to post a link to that file on this forum or in private?
 
I can't really devote that much time to Community support issues. If you can get an example of this where I can see the page, I can take a look.

-- hugh
 
I understand. Unfortunately the best I can do is give you the sandboxed copy of the site. It is just a test site, very barebones, to test this issue. If you get the time to look into this, you can either download it from me, or I can give you access to my MAMP install via a private url that I can supply you.
 
Last edited:
Another option that I can do is create a subsite and give you login details in private. Which ever is easier on you.
 
A URL I can hit from here. I just can't do Akeeba restores ... that's a level of support we only provide for Pro subscribers.

Make sure you enable Fabrik debug (in the global options), either to "yes" or "debug JS" so I can get the uncompressed JS.

-- hugh
 
Sure, I can do that. I will setup a private sandbox site duplicating the issue. I will send you a private message with url and login details once it's setup.
 
I replied to your PM. I'm getting a lot of 404 (not found) errors on loading the Profile form page, for our JS files.

-- hugh
 
Thank you. I am unfortunately, not getting those errors. I think that the errors that you are seeing are something funky with the reverse proxy I threw together real quick. I created a sandbox site on another server and tested this issue. I am not getting the problems, on that server, that I posted about. At this point, I think it's something to do with a setting in my MAMP stack. Once I find out what the problem is, I will post the solution here in this thread in case someone else encounters the same issue. Thank you again for taking the time to look into this!
 
This is defiantly a MAMP issue. Not sure how though. I get the same issue with MAMP free and MAMP pro. I have tested this on a linux server and the issue is not present. The only error that I am seeing in MAMP is;

Error: Load timeout for modules: fab/window,fab/elementlist
http://requirejs.org/docs/errors.html#timeout

This error does not occur until a few minutes after the page is rendered and this is the only error I am seeing.

Below is a screencast showing that I get no 404's on any load events;
http://screencast.com/t/PnhRPx2C

This secondary screencast displays that I have setup breakpoints on the first line under each function for the autofill.js file. The only breakpoints that get triggered are the first and last one. Initialize and setup are never triggered.
http://screencast.com/t/2ZAejH8K

On the pre-version of Fabrik, prior to the github update and on the older version of autofill, from roughly December, all breakpoints set get triggered as shown in the screencast below;
http://screencast.com/t/2eWOYYM4hV

This older version works with the pre-github updates. Now as I stated above, this is only present on MAMP in OS X. I tested this on a linux server with the latest versions of Fabrik and autofill, and they worked flawlessly. I have also been told that this issue is not present on WAMP in Windows, although I have not tested this.

Still investigating the issue! If anyone has any ideas as to why this is occurring, I am all ears.
 
I have solved this issue, "for the most part". The problem was that when I downloaded the git repository and copied it from the local git directory to the local sandbox directory, OS X finder did not copy over all the files and it did not overwrite the files that needed overwriting, even though I specified it to do so. So I had half old code and half new code. Once I copied all the code, via terminal instead of finder, everything seemed to start working again with autofill.

The only issue I am now having is exclusive to Safari with MAMP. I am getting the error "TypeError: undefined is not a constructor (evaluating 'new Autofill')" in Safari and only on MAMP. I do not get this error when I access one of my sandboxes on a linux server with Safari and I do not get this error with Chrome or Firefox when I access my MAMP sandbox. So the solution for this, for me, is to not waste time dealing with this Safari issue with MAMP. For any testing purposes in MAMP to use Chrome or Firefox.
 
Thanks for the detective work!

So you have git set up locally?

What I tend to do is once I've copied my main local repo folder into a J! web root, is then go into the web root and do a 'git pull', just to make sure I've got everything.

-- hugh
 
Great piece of advice and for sandboxes that I am doing fabrik testing on, I might just have to do that. Thank you for your help on this issue and your responsiveness to these forums.
 
We are in need of some funding.
More details.

Thank you.
Back
Top