Update: I've changed the MapsLocation class in
Maps/includes/Maps_Location.php to return '' rather than throwing an
exception upon getLatitude, getLongitude, getAltitude, and getAddress calls
when $isValid is false. This has the undesired result of showing the lat,
lng position of an unspecified location at (0,0), but I don't see any other
ill effects. I think this bug should be easy to reproduce locally (just
create a form with a location input, then create a page with that form and
leave the location blank, then edit that page with form), but here is my
stack trace for reference:
string(2549) "#0 /var/www/
ropewiki.com/extensions/Maps/includes/Maps_Location.php(433):
MapsLocation->getLatitude()
#1 /var/www/
ropewiki.com/extensions/Maps/includes/manipulations/Maps_ParamLocation.php(77):
MapsLocation->getJSONObject()
#2 /var/www/
ropewiki.com/extensions/Validator/includes/ItemParameterManipulation.php(61):
MapsParamLocation->doManipulation(Object(MapsLocation),
Object(ListParameter), Array)
#3 /var/www/ropewiki.com/extensions/Validator/includes/Param.php(244):
ItemParameterManipulation->manipulate(Object(ListParameter), Array)
#4 /var/www/ropewiki.com/extensions/Validator/includes/Validator.php(341):
Param->format(Array, Array, Object(ValidatorOptions))
#5 /var/www/ropewiki.com/extensions/Validator/includes/Validator.php(281):
Validator->doParamProcessing()
#6 /var/www/
ropewiki.com/extensions/SemanticMaps/includes/forminputs/SM_FormInput.php(115):
Validator->validateParameters()
#7 /var/www/
ropewiki.com/extensions/SemanticMaps/includes/forminputs/SM_FormInputs.php(129):
SMFormInput->getInputOutput('', 'Canyon[Coordina...', false, false, Array)
#8 [internal function]: smfSelectFormInputHTML('', 'Canyon[Coordina...',
false, false, Array)
#9 /var/www/
ropewiki.com/extensions/SemanticForms/includes/SF_FormPrinter.php(1760):
call_user_func_array('smfSelectFormIn...', Array)
#10 /var/www/
ropewiki.com/extensions/SemanticForms/includes/SF_FormPrinter.php(1262):
SFFormPrinter->formFieldHTML(Object(SFFormField), '')
#11 /var/www/
ropewiki.com/extensions/SemanticForms/includes/SF_AutoeditAPI.php(822):
SFFormPrinter->formHTML('<includeonly>?<...', false, true, 119,
'{{Canyon?|Regio...', 'Church Rock Can...', NULL)
#12 /var/www/
ropewiki.com/extensions/SemanticForms/includes/SF_AutoeditAPI.php(116):
SFAutoeditAPI->doAction()
#13 /var/www/
ropewiki.com/extensions/SemanticForms/specials/SF_FormEdit.php(96):
SFAutoeditAPI->execute()
#14 /var/www/
ropewiki.com/extensions/SemanticForms/includes/SF_FormEditAction.php(196):
SFFormEdit::printForm('Canyon', 'Church Rock Can...')
#15 /var/www/
ropewiki.com/extensions/SemanticForms/includes/SF_FormEditAction.php(32):
SFFormEditAction::displayForm(Object(SFFormEditAction), Object(Article))
#16 /var/www/ropewiki.com/includes/Wiki.php(439): SFFormEditAction->show()
#17 /var/www/ropewiki.com/includes/Wiki.php(305):
MediaWiki->performAction(Object(Article), Object(Title))
#18 /var/www/ropewiki.com/includes/Wiki.php(565):
MediaWiki->performRequest()
#19 /var/www/ropewiki.com/includes/Wiki.php(458): MediaWiki->main()
#20 /var/www/ropewiki.com/index.php(59): MediaWiki->run()
#21 {main}"
On Mon, Nov 25, 2013 at 10:21 AM, Benjamin Pelletier
<bjpcalt...@gmail.com>wrote:
> I have a semantic form with one input that accepts coordinates, and I use
> Semantic Maps to let the user fill that field. I'm having a problem when
> that input is left blank though -- when I go to edit the page after not
> filling in the location, I get big red text that says "Attempt to get the
> latitude of an invalid location" and the rest of the form doesn't
> display. See, for instance, here:
>
> http://ropewiki.com/index.php?title=Church_Rock_Canyon&action=formedit
>
> Is there a bug for this behavior already?
>
> Thanks,
> Ben
>
------------------------------------------------------------------------------
Shape the Mobile Experience: Free Subscription
Software experts and developers: Be at the forefront of tech innovation.
Intel(R) Software Adrenaline delivers strategic insight and game-changing
conversations that shape the rapidly evolving mobile landscape. Sign up now.
http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk
_______________________________________________
Semediawiki-devel mailing list
Semediawiki-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel