Please note that Form2Content is no longer being developed. All files from the latest version can be found on Github.

Form2Content Forum

Questions and answers for Form2Content, a Joomla CCK.
  1. Ellen Jensen
  2. Form2Content Lite & Pro
  3. Wednesday, 13 February 2019
  4.  Subscribe via email
Hello,

I am using Form2Content Pro version 6.17.4 and Joomla 3.9.2

I have an issue with a Geo Coder field in frontend (Show in front end).

The Google map is not loading in like 95% of all tries and so I can´t use Lookup lat/lon button either, but it works perfectly fine from backend.

How do I get the geo coder field to always load in frontend too?
Attachments (2)
Accepted Answer
Accepted Answer Pending Moderation
Hi Pieter-Jan,

I have found the issue. An error occurred when loading javascript files.
Some files were loaded before jQuery was loaded. The strange thing is that the erroneous behaviour only showed up in Chrome, not in Firefox.

It can easily be fixed by editing this file:
components/com_form2content/libraries/form2content/field/base.php

On line #685 it says:


// Add the common script for all fields, this must be loaded first to declare the namespace
JHtml::script('com_form2content/f2c_core.js', array('relative' => true));
// Add the script specific for this field
JHtml::script('com_form2content/fields/'.$this->getFieldName().'.js', array('relative' => true));


Change the code at that point to add an extra line:

// Add the common script for all fields, this must be loaded first to declare the namespace
JHtml::_('jquery.framework', true, true);
JHtml::script('com_form2content/f2c_core.js', array('relative' => true));
// Add the script specific for this field
JHtml::script('com_form2content/fields/'.$this->getFieldName().'.js', array('relative' => true));


I will add this code in a future release.

best,
Julien
Responses (11)
Accepted Answer Pending Moderation
Hi Ellen,

This behavior most likely means your Google Maps account is not fully configured. Do you have a Google Cloud Account with payment method active for this domain?

Regards,
Patrick
Please read the F2C documentation before asking questions! Thank you if you've done so ;)
  1. more than a month ago
  2. Form2Content Lite & Pro
  3. # 1
Accepted Answer Pending Moderation
Hi Patrick,

We have it setup with billing and activated Maps JavaScript API and Directions API.

The map is also loading 100% of the time in backend, but almost never in frontend - when I try to create f2c articles, which is weird.

Edit: I noticed something. I have chrome development tools open with "disable cache" checked, which seems to trigger a jquery error in geocoder.js: "Uncaught (in promise) ReferenceError: jQuery is not defined". Closing the developer tools or removing the chekmark and the map loads. Then I tested with an incognito tab and the first time I access the frontend creation of this f2c article and the map doesn´t load - pressing reload just once and the map loads again afterwards.
  1. more than a month ago
  2. Form2Content Lite & Pro
  3. # 2
Accepted Answer Pending Moderation
Hi Ellen, something is nagging me that I remember having this issue. I just can't remember what it was. Can you try adding sizes to the map in pixels?
Please read the F2C documentation before asking questions! Thank you if you've done so ;)
  1. more than a month ago
  2. Form2Content Lite & Pro
  3. # 3
Accepted Answer Pending Moderation
I went into backend->f2c->content type / Field->Geocoder field and it had 400 x 400 Pixels set. When I change the value, the map reflects it, but this doesn´t change the issue.

Is this what you had in mind with "adding sizes to the map in pixel"? Else just tell me what to do and I will test it.
Attachments (1)
  1. more than a month ago
  2. Form2Content Lite & Pro
  3. # 4
Accepted Answer Pending Moderation
I experience exactly the same problems.

Regards,
Pieter-Jan de Vries
  1. more than a month ago
  2. Form2Content Lite & Pro
  3. # 5
Accepted Answer Pending Moderation
I am trying to reproduce the issue so Julien can solve it.

Regards,
Patrick
Please read the F2C documentation before asking questions! Thank you if you've done so ;)
  1. more than a month ago
  2. Form2Content Lite & Pro
  3. # 6
Accepted Answer Pending Moderation
Hi,

Can I see this live on you site?
Can you send me credentials (julien at opensourcedesign dot nl) plus instructions on how to reproduce this issue?

best,
Julien
  1. more than a month ago
  2. Form2Content Lite & Pro
  3. # 7
Accepted Answer Pending Moderation
Hey Julien,

I sent you an Akeeba backup. Let me know if you don't receive it.

Regards,

Pieter-Jan
  1. more than a month ago
  2. Form2Content Lite & Pro
  3. # 8
Accepted Answer Pending Moderation
Hi Pieter-Jan,

I have received the back-up. Thank you. I will try and investigate this issue.

best,
Julien
  1. more than a month ago
  2. Form2Content Lite & Pro
  3. # 9
Accepted Answer Pending Moderation
Hello JulienJulien

Not easy to find. My compliments and thanks for the swift resolution.

Regards,

Pieter-Jan
  1. more than a month ago
  2. Form2Content Lite & Pro
  3. # 10
  • Page :
  • 1


There are no replies made for this post yet.
However, you are not allowed to reply to this post.