error when trying to create new menu item / Joomla! 3.8.10 - joomla

I hope somebody can help me .. I try to open a new entry in a joomla menu and get the following error output:
0 Cannot use object of type stdClass as array
/mnt/web208/e2/01/56797301/htdocs/plugins/system/helix3/helix3.php:55
error output
Function Location 1 () JROOT/plugins/system/helix3/helix3.php:55 2 plgSystemHelix3->onContentPrepareForm() JROOT/libraries/joomla/event/event.php:70
3 JEvent->update() JROOT/libraries/joomla/event/dispatcher.php:160
4 JEventDispatcher->trigger() JROOT/libraries/src/MVC/Model/FormModel.php:321
5 Joomla\CMS\MVC\Model\FormModel->preprocessForm() JROOT/administrator/components/com_menus/models/item.php:1254
6 MenusModelItem->preprocessForm() JROOT/libraries/src/MVC/Model/FormModel.php:242
7 Joomla\CMS\MVC\Model\FormModel->loadForm() JROOT/administrator/components/com_menus/models/item.php:552
8 MenusModelItem->getForm() JROOT/libraries/src/MVC/View/HtmlView.php:423
9 Joomla\CMS\MVC\View\HtmlView->get() JROOT/administrator/components/com_menus/views/item/view.html.php:58
10 MenusViewItem->display() JROOT/libraries/src/MVC/Controller/BaseController.php:672
11 Joomla\CMS\MVC\Controller\BaseController->display() JROOT/administrator/components/com_menus/controller.php:75 12 MenusController->display() JROOT/libraries/src/MVC/Controller/BaseController.php:710
13 Joomla\CMS\MVC\Controller\BaseController->execute() JROOT/administrator/components/com_menus/menus.php:18
14 require_once() JROOT/libraries/src/Component/ComponentHelper.php:382
15 Joomla\CMS\Component\ComponentHelper::executeComponent() JROOT/libraries/src/Component/ComponentHelper.php:357
16 Joomla\CMS\Component\ComponentHelper::renderComponent() JROOT/libraries/src/Application/AdministratorApplication.php:101
17 Joomla\CMS\Application\AdministratorApplication->dispatch() JROOT/libraries/src/Application/AdministratorApplication.php:159
18 Joomla\CMS\Application\AdministratorApplication->doExecute() JROOT/libraries/src/Application/CMSApplication.php:195
19 Joomla\CMS\Application\CMSApplication->execute() JROOT/administrator/index.php:51

The error occurred in the file helix3.php on line 55. Plugging the displayed notation ("helix3.php:55", with the quotes) into Google yields this page as first result:
https://www.joomshaper.com/forums/helix3-plugins-causing-joomal-menu-to-not-work-0-cannot-use-object-of-type-stdclass-as-array
This site states it's a known bug and an update will be released soon. Try to update the plugin, or modify the helix3.php file as explained.
And please use Google (or another search engine of your liking) before posting a question. Filenames + Line numbers as well as paths and the first sentence of error messages make for great search terms.
PS: Welcome on StackOverflow!

Related

Suppressing ipdb output in Spyder iPython interpreter

I have reason to believe that my iPython interpreter is causing my kernel to die and restart similar to the issues logged in this link and that link.
The latter link indicates that the error is caused by the fact that the debugger outputs step-by-step ipdb content into the interpreter. One user reported that the behavior stopped when he (and I quote)
disabled logging to console before running in debug mode
How does one "disable logging to console" in Spyder IDE/IPython? I really need to do this so I can at least step through my code....
EDIT
I would like to suppress this kind of output
ipdb> > d:\temp\other const models\plaxis\output\plotparfile.py(16)PlotParFile()
14 with open(filename,'r') as fid:
15 lines = fid.readlines()
---> 16 fid.close()
17 #split first line get header and pop it out
18 header = lines[0].split()
> d:\temp\other const models\plaxis\output\plotparfile.py(18)PlotParFile()
16 fid.close()
17 #split first line get header and pop it out
---> 18 header = lines[0].split()
19 lines.pop(0)
20
(Spyder developer here) That output is generated automatically and its purpose is to tell you where are you placed in your code while debugging.
Right now there are no options in Spyder to deactivate it. Besides, I really doubt that output could be the cause of any kernel failures.

VIM visual block sort numerically using Vissort

I need help using the Vissort plugin to visual block sort numberically.
The documentation states that I can use the 'VSO n' command to set sort to 'n' for numeric but I'm having no success.
I'm on a windows machine.
The below example only has one column, but in the real world I need to be able to numerically sort on any column within a text file. For now my work around is using '!gsort.exe -k 10 -n' to sort by the 10th column.
After using 'VSO n' and running Vissort, this is how my list is sorted:
1
11
13
15
17
19
2
21
23
25
27
29
3
31
33
35
37
39
You can use GNU sort. First select visual block and then:
:'<,'>!sort -k 1 -n
Apparently, the :VSO option only applies to the :Vissort command, not to :'<,'>B sort.
So, either of these should work:
:VSO n
:'<,'>Vissort
or
:'<,'>B sort n

Read Matrix from a file to Octave

I'm trying to read a matrix from a file to Octave and then apply a svd. As example, the following matrix in a text file called "teste.txt":
1 3 -2 3
3 5 1 5
-2 1 4 2
I'm trying to execute the following script in octave:
data = dlmread ("teste.txt", "\t",0,0);
svd(data)
However, I'm facing the following error, which I don't know exacly why:
/home/thiago/Documents/svd.oct: invalid ELF header
error: called from:
error: /home/thiago/Documents/svd.oct at line 2, column 1
Does anybody have any clue? I'm executing it on Ubuntu 14.04 and the file separator is a tab(\t).
Thank you very much in advance,
Thiago.

gnuplot not recognizing plot for syntax

I am trying to use the for syntax for multiple columns.
I have a data file colhead.dat:
Id a1 a2 a3
1 1 2 3
2 2 3 4
3 2 3 4
Following the answer https://stackoverflow.com/a/17525615/429850, I do
gnuplot> plot for [i=2:5] 'colhead.dat' u 1:i w lp title columnheader(i)
^
':' expected
How do i write the for loop? Here's the gnuplot version header
Version 4.2 patchlevel 6
last modified Sep 2009
System: Linux 2.6.32-71.el6.x86_64
For-loops have been implemented in version 4.6 of gnuplot, and there was nothing like loops in the versions before. So you have to update your version!
Edit: As Christoph mentioned, first for functionality was introduced in 4.4. However, 4.2 is too old.

Passing alias as argument in bash

You can use built in command cal for example in this way:
cal 10 2013
and you will get a calendar of Octber 2013. My teacher made and assignment to change first argument in a way, that we could call this function in our native language. For example:
cal spalis 2013
cal gruodis 1999
and so on..
(spalis means october, and gruodis -december in my country)
And we would see same result as cal 10 2013 or cal gruodis 1999
Same goes with others months. I am newbie in shell, and thought that i could make an alias:
alias spalis=10
and then i tried to use cal spalis 2013, but i got error:
cal: spalis is neither a month number (1..12) nor a name
So, after googling for a while, i guess there is no way to pass alias as an argument? Or i'am doing something wrong? Maybe there is some other way? I'll be very thankful for an advice and sorry for bad english :)
Aliases only work for the command name, not for arguments. What you'll want to do is write a function cal which replaces the first argument with the appropriate number and then calls the regular cal binary.
cal() {
local month=$1
local year=$2
# replace named $month with a numeric $month here
...
# Call the real cal. `command' ignores this function and calls the underlying binary.
command cal "$month" "$year"
}
cal accepts month names in the language specified by the current locale. To accept Lithuanian month names, use
$ LANG=lt_LT cal spalis 2013
Spalio 2013
Sk Pr An Tr Kt Pn Št
1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31
This depends on the version of cal you are using. The above works on my MacOS X 10.9 machine, but not on one of my Linux boxes (where cal doesn't accept month names at all, only numbers).
This may not be exactly what your teacher is looking for, as it only requires using the program as intended. :)

Resources