1

Found an error caused by Mighty Big Robot's Geotagger in the EE developer's log. It seems that this issue might have existed since 2.6.

Here's my error:

Deprecated function EE_Fieldtype() called in system/expressionengine/third_party/geotagger/ft.geotagger.php on line 47. Deprecated since 2.6. Use EE_Fieldtype::__construct() instead.

Does anyone know anything about their update or if its easy to change the code to work to the 2.6 fieldtype?

Thanks!

4 Answers 4

1

In ft.geotagger.php, inside the __construct() function, change:

parent::EE_Fieldtype();

to

EE_Fieldtype::__construct();

That's it.

0

I've started a thread in the EE forums: http://ellislab.com/forums/viewthread/244991/

There has been one solution posted, but it requires a hack to the native EE text fieldtype code (/system/expressionengine/fieldtypes/text/ft.text.php) from

 $field = array(
   'name'  => $this->field_name,
   'value'  => $this->_format_number($data, $type),
   'dir'  => $this->settings['field_text_direction'],
   'field_content_type' => $type
  );  

to

 $field = array(
   'id'  => $this->field_name,
   'name'  => $this->field_name,
   'value'  => $this->_format_number($data, $type),
   'dir'  => $this->settings['field_text_direction'],
   'field_content_type' => $type
  );  

But I don't know what impact that would have to the system. I've posted the question to the developer, and will update the thread if there are any other solutions suggested.

Thanks Derek for jumping in on this. I don't have enough reputation points to add a comment to your answer, so I'll just edit my entry.

The hack was required in addition to the function change suggested by the developer log to make the add-on fully functional.

Updating the function name as you suggested does allow the fieldtype to install successfully, but it still doesn't work right. The fieldtype loads in the entry, but when you put in any address information and hit "Geocode Entry" it yields no results. That's why it was suggested to hack the fieldtype code. Like you, I do not recommend a system hack ever, so I am trying to find the portion of the add-on that EE 2.7+ does not like.

I've never built an add-on, so I am at a loss for where to go from here.

2
  • This change is unrelated to the posted question regarding the developer log warning - and you should never hack the EE core files to fix an issue with an add-on! Commented Apr 18, 2014 at 15:41
  • @DerekHogue, I wholeheartedly agree that you should never hack the system if at all possible. I can confirm that the combination of the function name change and the fieldtype hack works in 2.8.1. The function name change allows the add-on to install. The fieldtype hack allows the geotagger field to communicate with the other fields (address, city, state, zip) to build and adjust the google map. Geotagger is such a great add-on! I'm hoping someone has figured out how to adjust the add-on code, so this hack is no longer necessary. Commented Apr 18, 2014 at 22:28
0

CG11 posted a better solution on my forum thread, so I'm adding it here This one does not requiring hacking the fieldtype.

It's a 2-step solution. You still have to change the construct function as Derek suggested. The other part is to change the javascript in the themes folder.

Here is a link to the updated script

Hope that helps everyone!

0

The developer updated the addon to version 3.06 in April and this is working for me on EE 2.9.0 http://mightybigrobot.com/products/detail/geotagger

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.