warning: Invalid argument supplied for foreach() in /modules/markitup/markitup.module on line 167.
warning: Invalid argument supplied for foreach() in /modules/markitup/markitup.module on line 216.

This appeared when clicking the create content link

Comments

waldmeister’s picture

So you should begin posting, whats around lines 167 and 216 or testing to comment out those lines.

Additionally tell us (or me...) which browser and Javascript you are using.

AND PLEASE put your Module to /sites/all/modules/ - this is the desired location

darumaki’s picture

It's fine now after I set the defaults, warning message went away

splondike’s picture

Assigned: Unassigned » splondike
Category: support » bug
Status: Active » Needs review
StatusFileSize
new679 bytes

I've attached a patch which removes the warnings.

webchick’s picture

Status: Needs review » Needs work

I receive this too, at admin/settings/markitup upon initially installing the module.

I confirmed that this fixes this warning, but then causes the following on my install:

* notice: Undefined index: 1 in /Applications/MAMP/htdocs/pug/sites/all/modules/markitup/markitup.admin.inc on line 82.
* notice: Undefined index: 2 in /Applications/MAMP/htdocs/pug/sites/all/modules/markitup/markitup.admin.inc on line 82.
* notice: Undefined index: 3 in /Applications/MAMP/htdocs/pug/sites/all/modules/markitup/markitup.admin.inc on line 82.

I looked through the code and it seems that the markitup_editors_formats table is not being populated until this form is submitted. It should probably happen on module installation.

kenorb’s picture

The same problem:

warning: Invalid argument supplied for foreach() in /home/sites/w/public_html/sites/all/modules/contributions/markitup/markitup.module on line 167.
warning: Invalid argument supplied for foreach() in /home/sites/w/public_html/sites/all/modules/contributions/markitup/markitup.module on line 216.
Garrett Albright’s picture

Status: Needs work » Fixed

This will be fixed in the next dev release.

naheemsays’s picture

I have updated a previously working markitup install to the new nightly, but the buttons stopped working? I tried adding the newer markitup version too (1.1.5), but there was no success.

I have gone back to the previous/old nightly from 2008 and the buttons are showing up again.

Garrett Albright’s picture

nbz, are you using a set other than "default" (HTML)? Did you remember to put a new version of the set in the markdown/sets subdirectory as well? If you copied over a set from an older version, it's not going to work. Same with skins.

If that's not the problem, could you give me a little more info?

naheemsays’s picture

StatusFileSize
new65.99 KB

yup, that would be the problem - I did not change/modify the sets.

Strange thing is that my set works with markitup 1.1.5 but with the older nightly ?!?

Do I need to make any particular changes to the set?

I have attached my set if you want to have a look...

Garrett Albright’s picture

Well, the naming of variables in sets changed somewhere around markItUp! 1.1.4, yes. So older and newer versions of sets, and older and newer versions of the module, are not interchangeable.

Edit your set.js file and change the name of "my_custom" to "mySettings". See markitup/sets/default/set.js (or any other new set's set.js file) for an example.

naheemsays’s picture

StatusFileSize
new65.21 KB

I have done that but with no luck. attached is my up to date custom set.

naheemsays’s picture

StatusFileSize
new65.18 KB

This set works more or less - if it replaces the default set. putting in a separate folder with it as an option does not work.

Another thing - with this set for some reason the text area is too wide for me.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.