Adding custom control to a Nette Form - nette

I am attempting to add a custom control to a nette form, using the example given in the official documentation here.
I am having problems. First off I though I would try to use the example as a starting point. Unfortunately it doesn't work. when using the code provided I get
Notice: Uninitialized string offset: 0 in Composer\vendor\nette\utils\src\Utils\Html.php on line 494
Warning: Illegal offset type in Composer\vendor\nette\utils\src\Utils\Html.php on line 392
and only the label actually renders. Have I missed something obvious here or does the example just not work?

Related

Ignition 7.8 – Get Component Text From Text Area Within Container Via Scripting

A Button with scripting is saving Component values to parameters for a SQL update. The calling button is one level above the Container that holds the Text Area. However, the set for the Text Area value using the recommended User Manual method is throwing the error “AttributeError: 'NoneType' object has no attribute 'text' “
Standard form not working:
Comments = event.source.parent.getComponent('textArea1).text
Also tried different attributes at the end of the call:
… .string , … .value , … .stringvalue
event.source.parent.parent.getComponent('textArea1).text
When looking at the Property Binding path on the Component, I am able to return “Root Container. ContainerName.textArea1.text”. When I modified to be a GetProperty pull like below, I received a similar error mixed with an add on of Selected Property Not Found. I tried similar alternatives to those listed above.
Comments = event.source.parent.ContainerName.getComponent('textArea1).text
Any suggestions?
The solution is to call the Container component by name using the ‘.getComponent’ method and then call the Text Area using the standard method. The combined code is below for setting to the Parameter Comments.
Comments = event.source.parent.parent.getComponent('ContainerName').getComponent('TextArea1').text
Retrieving a Component value from within a Container does not appear to be covered in the Ignition Manual.

Stack Trace Error for RefTableId field assignment

I created a new table and added a new Integer field (called RefTableId) with an EDT of the standard RefTableId type. Writing NewTable.RefTableId = tableNum(SomeTable); compiles but during run time I get this stack trace error: "Error executing code: Wrong argument types in variable assignment."
I've even tried NewTable.RefTableId = 0; This still fails. And yes, I've triple checked that it is indeed an integer field.
The solution is really stupid, the line before the assignments was reading .data() out of a FormListItem object that had invalid data in it. Instead of showing an error for that line, it skips over it and fails the assignment lines below. It makes no sense to me since I wasn't using any information from that FormListItem object to populate any field data with, yet still caused that to fail for some reason. I'm going to mark this one in the "Bang Head Here" category.
If the code is in a class, be sure to do a compile of all super classes as well as a compile forward (child classes). Remember to do an incremental CIL.
If it still fails do a full compile (axbuild).

Errors in Drupal 7 - Trying to get property of non-object in taxonomy_overview_terms()

I would love to get some help here. I enabled the forums module which is part of Drupal core. When I go to add a container, I get the following error:
Notice: Trying to get property of non-object in taxonomy_overview_terms() (line 279 of D:\Development\drupal\sites\all\modules\taxonomy\taxonomy.admin.inc).
Notice: Trying to get property of non-object in taxonomy_overview_terms() (line 403 of D:\Development\drupal\sites\all\modules\taxonomy\taxonomy.admin.inc).
Notice: Trying to get property of non-object in taxonomy_overview_terms() (line 405 of D:\Development\drupal\sites\all\modules\taxonomy\taxonomy.admin.inc).
I have tried to delete the tables and reinstall the module. I have the same module enabled on another one of our sites (which is identical in structure). But I do not get these errors on it. Anyone know how to fix this?
Thanks!
FWIW I debugged a similar issue and found that the 'forum' vocabulary nav variable (forum_nav_vocabulary) was not set in my installation, and that just plain breaks things. In the forum module there are a number of calls to variable_get('forum_nav_vocabulary', ''), but unfortunately if it is not set, using an empty vid has not been properly catered for.
If you set it, make sure to use the vid and not the machine name (i.e. the number, not the name). You will need to do this with drush, via the db, or using devel module's variable editor.

Error when adding a new cck field

For some reason I get error on lots of pages after adding a simple text field to a content type. And error on pages that doesn't use the content type, and hasn't any relation to the modified content type.
The content type is just a regular form where customers can add some simple data that is later displayed in a view.
The new field is addad to a contenttype that already has som data stored with it.
In the log I found this error message:
Warning: preg_match() [function.preg-match]: Compilation failed: disallowed Unicode code point (>= 0xd800 && <= 0xdfff) at offset 1811 in ctools_cleanstring() (line 157 of /home/u/u4144602/www/profiles/nodestream/modules/ctools/includes/cleanstring.inc).
Does anyone know?
It's a drupal 6 installation, a nodestream distribution.
I too got this problem earlier.I've replaced
'\x{a80b}\x{a823}-\x{a82b}\x{d800}-\x{f8ff}\x{fb1e}\x{fb29}\x{fd3e}\x{fd3f}'.
with
'\x{a80b}\x{a823}-\x{a82b}\x{e000}-\x{f8ff}\x{fb1e}\x{fb29}\x{fd3e}\x{fd3f}'.
Hope this link might help u... :)
http://drupal.org/node/1878284
http://drupal.org/node/1444006

Drupal, broken view, need help

I am getting strange problem.
When I am listing some content type, intead of data I am getting 'n/a' string.
I listed views, and on one view I have 'Warning - Broken view!' message.
I can't edit / delete this view because it always redirect to front page.
I checked my logs and all I see is repeating:
# warning: Invalid argument supplied for foreach() in /home/www/testetelgsm/www/includes/common.inc on line 3364.
# warning: Invalid argument supplied for foreach() in /home/www/testetelgsm/www/modules/cck/content.module on line 1284.
# warning: array_keys() [function.array-keys]: The first argument should be an array in /home/www/testetelgsm/www/includes/common.inc on line 3361.
How can I delete / edit this view?
Could somebody help?
Regards
You need to go to the views admin page at: admin/build/views. Here you can find a list of all your views and edit/delete them.
It sounds like you are trying to pull something that doesn't exist anymore like a deleted cck field. Anyways, if it doesn't work to edit it, try to recreate it.
You can make views into features with the features module. That will define the views in a custom module that is generated for you, and make the view defined in code. That will make it possible to restore it, if it gets edited.

Resources