1. The 3.8 code for Fabrik is now available on github, in the 'master' branch. If you are familiar with updating Fabrik from github, we would appreciate it if you could test this code on J! 3.8 for us. Once we have some feedback, we'll build a 3.8 release.

parsererror when autofill plugin doesn't find matching record

Discussion in 'Community' started by jbyrley, May 10, 2017.

  1. jbyrley

    jbyrley New Member

    Level: Community
    Autofill plugin is set to search if a userid is already present in the list, and if so, to autofill that user's data.

    I am getting a parserror when the user is new; ie when the userid is not yet present in the list.

    Otherwise it works.

    I had this working before on another form, but then trashed that form and can't get this one to work. Maybe I am forgetting how to configure the plugin.

    I have the Autofill set to

    -connection site: database
    -list: list1
    -lookup field: user
    -field to observe: user
    -map data: [blank]
    -trigger: [blank]
    -edit original record: yes
    -autofill confirmation: no
    -autofill on load: new forms only
     
  2. cheesegrits

    cheesegrits Support Gopher Staff Member

    Level: Community
    Having blank map data will never work. You have to map at least one element.

    -- hugh
     
  3. jbyrley

    jbyrley New Member

    Level: Community
    So, would I have to map every single field to be mapped in the "map data" box? I don't believe I did that before on the form that was working correctly.

    Also, even with "map data" blank, autofill does work without a "parsererror" message as long as the user has already entered some data and saved it (ie as long as the autofill can find a match in the lookup table in the "user" field).
     
    Last edited: May 11, 2017
  4. cheesegrits

    cheesegrits Support Gopher Staff Member

    Level: Community
    Sorry, I didn't notice the "edit original record" was set in your first post.

    I'll test it here and let you know.

    -- hugh
     
  5. jbyrley

    jbyrley New Member

    Level: Community
    Thanks. I recovered the old form that I thought was working correctly, but it was actually doing the same thing...
    i.e., when the autofill is unable to locate a matching record, it gives a popup window saying "parsererror."

    So at that point, if I close that popup, I can go ahead and fill the form, save it, log out, log back in, and go to that form again and the autofill works correctly -- it fills in the data for me from the list with no error message. So it just seems if I can keep that message from coming up, the problem will be solved (?).
     
  6. cheesegrits

    cheesegrits Support Gopher Staff Member

    Level: Community
    Yeah, I'd forgotten that "edit original record" generates the map for you.

    I just tested here, and it works OK. No 'parseerror'. It either shows the "no record found" message or not (according to your settings).

    Can you point me at your page, I'll take a look. Make sure Fabrik debug is enabled (global settings) so I can load the uncompressed JS.

    -- hugh
     
  7. cheesegrits

    cheesegrits Support Gopher Staff Member

    Level: Community
    Here's a screencast showing it working with / without "show message" ...

    https://www.screencast.com/t/mtKsNMDby7Ns

    Sorry about the horrible slowness, I run everything on my laptop (debugger, database, web server, browser) and sometimes it grinds a little slow.

    -- hugh
     
  8. jbyrley

    jbyrley New Member

    Level: Community
    Thanks Hugh. As usual, above and beyond the call of duty. I really appreciate it.

    So, since you got it to work with no problems, I figured it was something wrong with my Fabrik installation. I noticed it was out of date and updated it. It appears (at least for now) the problem has been solved. I will keep you updated if it recurs.
     
    cheesegrits likes this.

Share This Page