1

Topic: Undefined index: allow_ranges in data_entry_helper::getAttributes

I have created a form that allows us to edit records entered using the LERC Wales app (hosted on iRecord) directly from within the various Welsh LERC websites. On my version (SEWBReCORD) this form behaves properly, but on the BIS version (WiReD) we get the error below when the page loads.
As far as I can tell there is no difference in between the data_entry_helper.php between the two websites, so presumably the offending index is created elsewhere. Anyone know where I might start to look for this?

Notice: Undefined index: allow_ranges in data_entry_helper::getAttributes() (line 7394 of modules\iform\client_helpers\data_entry_helper.php).

data_entry_helper::getAttributes(Array, ) (Line: 934)
iform_dynamic_sample_occurrence::getAttributesForEntity('sample', Array, Array, '4051518') (Line: 907)
iform_dynamic_sample_occurrence::getAttributes(Array, Array) (Line: 253)
iform_dynamic::get_form(Array, '3', NULL) (Line: 538)
iform_node_view(Array, Object, Object, 'full')
call_user_func_array('iform_node_view', Array) (Line: 403)
Drupal\Core\Extension\ModuleHandler->invokeAll('node_view', Array) (Line: 269)
Drupal\Core\Entity\EntityViewBuilder->buildMultiple(Array) (Line: 220)
Drupal\Core\Entity\EntityViewBuilder->build(Array)
call_user_func(Array, Array) (Line: 378)
Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 195)
Drupal\Core\Render\Renderer->render(Array, ) (Line: 226)
Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}() (Line: 582)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 227)
Drupal\Core\Render\MainContent\HtmlRenderer->prepare(Array, Object, Object) (Line: 117)
Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse(Array, Object, Object) (Line: 90)
Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray(Object, 'kernel.view', Object)
call_user_func(Array, Object, 'kernel.view', Object) (Line: 111)
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch('kernel.view', Object) (Line: 156)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 68)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 57)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 99)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 78)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 52)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 665)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)

Dave Slade
Senior IT & Records Officer,
13 St Andrews Crescent, Cardiff, CF14 3DB
www.sewbrec.org.uk, www.sewbrecord.org.uk

2

Re: Undefined index: allow_ranges in data_entry_helper::getAttributes

Hi Dave

How about updating all sites to the latest version of the IForm module first so you know they are all working on the same, and the most up to date, version of the code? I don't think I would bother diving in deeper until you are sure you have consistency across the sites in all files, not just data_entry_helper.php.

Jim Bacon.

3

Re: Undefined index: allow_ranges in data_entry_helper::getAttributes

Thanks Jim, will do - although they should all be the same given that we updated all three at the same time. Unless it was one of the tweaks we made... hmmm.
Dave

Dave Slade
Senior IT & Records Officer,
13 St Andrews Crescent, Cardiff, CF14 3DB
www.sewbrec.org.uk, www.sewbrecord.org.uk

4

Re: Undefined index: allow_ranges in data_entry_helper::getAttributes

Hi Dave
Allow_ranges is a new feature in the warehouse v2 code, which is not live yet. If you are using the develop branch of the iform client_helpers code then you will get this message.
Regards
John

John van Breda
Biodiverse IT

5

Re: Undefined index: allow_ranges in data_entry_helper::getAttributes

Thanks John - I've not changed the client helpers on the BIS site, but it is possible that Steve has. I'll check with him on Tuesday.
Dave

Dave Slade
Senior IT & Records Officer,
13 St Andrews Crescent, Cardiff, CF14 3DB
www.sewbrec.org.uk, www.sewbrecord.org.uk