Closed (fixed)
Project:
Simplenews
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
8 Jan 2009 at 19:35 UTC
Updated:
23 Jan 2009 at 20:20 UTC
Jump to comment: Most recent file
Comments
Comment #1
jcbrew commentedI'm getting the same error when trying to use TinyMCE
Drupal 6.8
TinyMCE 6.x-1.1-dev
TinyMCE (Moxiecode file) 3.2.1.1
Comment #2
sutharsan commentedI can not reproduce it and have no idea what causes this error. Do you use a module what does something with taxonomy?
You need to debug the code. For example by inserting
Before line 1193 in form.inc and report the result here.
Comment #3
mohammed76hi.
I copied the suggested line to form.inc before line 1193 which made the editor shift the offending line to 1195. I didn't get anything different when going to the setting page. still same error. warning: Invalid argument supplied for foreach() in /includes/form.inc on line 1195.
how can I trouble shoot it more?
Comment #4
sutharsan commentedDid you get any message, except the fault message?
Do you use a module what does something with taxonomy?
Do you have some kind of access restriction on taxonomies?
The attached patch will solve the error, but I would be very interested in finding out what the cause of this is.
The problem comes from line 739 (latest HEAD) of simplenews.admin.inc (first line in below code)
Perhaps you can find out why taxonomy_vocabulary_load() does not return a $vocabulary->nodes (NULL value).
Comment #5
mohammed76hi.
installing the dev version of simplenews doesn't change the situation.
let me give you as much information as I can.
1. simplenews was the last module that I installed that has to do with taxonomy directly. the other module is the core forum module.
2. when I first installed the module, it created a default newsletter and it automatically named it تقنيات الكفيف العربي newsletter. notice that my site name is arabic. however, after navigating through the module pages in both the content and site configuration categories, suddenly the default newsletter got deleted on its own. I don't remember what I was doing then, but I sure went to admin/build/block to assign the newsletter block to the right side bar but didn't find it.
3. when I installed the dev version today and tried to create the newsletter by the same arabic name, the news letter was created successfully, and a matching taxonomy term was created. however, going to admin/settings/simplenews/general I still get that same error.
4. I still haven't tried to delete the newsletter and create a test news letter and give it an english name, as I suspect that none latin characters have to do with the problem. let me know if that test would be useful.
5. thanks for the patch, but I can't apply it on my own, still haven't learned how to apply patches.
thank you.
Comment #6
mohammed76here is more info after some troubleshooting:
1. renaming the news letter to something in english doesn't seem to be related as this didn't do anything
2. something worth noting in admin/settings/simplenews/general page: I noticed that no content type was selected, although I saw newsletter issue checked in the past. second, no vocabulary was selected and I only had one vocab called forums automatically created by the core forum module.
3. manually creating a vocabulary name newsletters and then assigning it as the default vocabulary results in deleting the newsletter that was present. but I no longer see that argument error, instead I get this: Array ( [simplenews] => simplenews ) I know it's not complete, but that is all that is displayed.
4. I create yet a new newsletter and gave it an arabic name. this worked ok. but this newsletter is assigned id number 3. trying to change the edit page url to /2 or /1 results in not found page.
hope the above is useful.
Comment #7
sutharsan commentedThis all fits into my image of the problem. Thanks for the details.
Please explain "results in deleting the newsletter that was present" in your no. 3
The message "Array ( [simplenews] => simplenews )" is the result of #2. Simply remove the added line.
The id number of the vocabulary is no problem, no need to change it.
I decided to commit the patch. It will prevent the error messages. But still I have no idea what caused the vocabulary to loose it's node type settings. What did you do before you saw the error?
Comment #8
mohammed76what I meant by number 3 was that I had a newsletter id number 2. when I manually created the vocabulary and assigned it to the newsletter in /admin/settings/simplenews/general, I found that even the newsletter id number 2 was deleted. I created a newsletter that was given id number 3, and uploaded an unmodified version of form.inc. now everything seems to be working normally with no errors.
I didn't notice the step that made the newsletter loos its content type associations. but I missed it when I tried to associate the newsletter block to one of my sidebars.
if there's something else you want me to do I will be more than happy to do it. otherwise, feel free to mark issue as fixed.
Comment #9
sutharsan commented@mohammed76, thanks for your quick response to this issue.
@jcbrew if the last 6.x-1.x-dev (new release in a couple of hours) does not solve your problem, feel free to reopen the issue.
Comment #10
mohammed76jcbrew's problem is with the tiny mc editor not with simplenews. it was I who reported the issue. since I managed to solve it without the patch, I won't be able to test the new dev release. however, what I can do is I can install it on a fresh installation just for testing.
thank you very much. looking forward for the new dev release.