Closed (fixed)
Project:
Category
Version:
6.x-2.0-beta2
Component:
Wrapper modules
Priority:
Critical
Category:
Bug report
Assigned:
Reporter:
Created:
3 Feb 2007 at 21:24 UTC
Updated:
14 Jun 2009 at 10:20 UTC
Jump to comment: Most recent file
Comments
Comment #1
yopyop commentedThis was also the case for me in drupal 5.1. The newsletters I tried to create in the simplenews admin would not show up in the drowdown either.
I also was not able to see a simplenews block in administer > site building > blocks
Comment #2
fossilfool commentedThis might be a bug with Taxonomy wrapper of the Category Module. This bug is similar to the problem people were having with new Forums not showing up. Jaza fixed that one recently. Could be similar to this. I move this issue to Category. A good test would be to install Simplenews on a clean Drupal 5.1 install with no Category module.
Comment #3
sutharsan commentedIt looks like mrgroove's problem was solved by enabling the taxonomy wrapper.
Solidbluechameleon, please give more details of the problem since I can not create a situation for which your code is a solution. Please describe the setup of your category module and how you use the simplenews module with the category module.
Comment #4
sutharsan commentedOops, working on other (but related?) issue. Pls ignore this posting.
Comment #5
sutharsan commentedComment #6
bdragon commentedAssigning to self, looking into this for fossilfool.
Comment #7
bdragon commentedFound it!
Simplenews checks $node->taxonomy during the submit hook. At that time, the wrapper has not injected $node->taxonomy yet.
Does this patch improve things for you guys?
Comment #8
bdragon commentedHmm, this might also fix some of the Forum problems people are having. Investigating further...
Comment #9
bdragon commentedAfter more research, I came up with this. This one syncs during the validate op instead, and fixes some forum problems as well as the simplenews problem.
Comment #10
yopyop commentedThanks, everyone who is working on this. I will apply the patch tonight soon and see what happens. In the meantime I rolled my own newsletter system by to an outside service, but I'd love to have this work..
best
barry
Comment #11
yopyop commentedThanks bdragon, for the patch - I ran it, but I am still getting the same thing - the newsletter I create does not take - it doesn't show up in the list, but I notice if I go to adminster> content management > content, the node for the newsletter shows up, but it has no type set - so the simplenews module doesn't seem to be able to see it.. hmmm.
BTW I am using Drupal 5.1 and the newest Simplenews 5.1 dev version..
Comment #12
yopyop commentedIt was suggested to me in a area drupal group to disable category module, and this cleared my issue up with simplenews.
Comment #13
sjh-1 commentedI've found that this patch as committed into 1.26.2.1 corrupts the node_term table and hence breaks support for views and other modules. See #18 through #20 in http://drupal.org/node/87669 where I have a patch that should fix it.
Comment #14
megg commentednevermind.
Comment #15
lias commentedIs this issue fixed now? Category module is still listed as incompatible with Simple news.
Comment #16
mcri commentedWondering the exact same thing as pp...looking for a simple newsletter system to set up within my Drupal site, and Simplenews seems the most recommended/supported of contrib modules.
But Category is far too important for me to flub up w/an incompatible contrib module. Thanks for any updates!
Comment #17
lias commentedChecking status if simplenews is now compatible with category module.
Comment #18
Wolfflow commentedSubscribe.
Comment #19
marcoBauli commentedpatch #7 above did the job! I can see all the newsletters and respective blocks now, thanks!
Comment #20
pjek commentedSo what needs to be done now? My client want both Simplenews and Categories, how do I proceed?
Comment #21
lias commentedYes, I could use this to. Will a new version with patch be added for download?
Comment #22
Thomas Sewell commentedSee http://drupal.org/node/87669#comment-949328 for details.
The attached patch makes simplenews use $node->category instead of $node-taxonomy when the category module has it set. If the category module isn't setting $node-category because it's not installed, it will still use $node->taxonomy.
In what is likely related to upgrading instead of to this issue, I also had to repopulate simplenews_snid_tid from my pre-upgrade data.
insert into simplenews_snid_tid select * from <old_database>.sn_snid_tid;If you are sending test newsletters ok, but have lost all your subscriptions for the real thing after upgrading, that may be the issue and solution for you.
Comment #23
sutharsan commented#22 looks like a decent patch. If some people can test and confirm that this solves the imcompatibility, I am happy to commit it to simplenews. Does category clean up the
$node->categorywhen the module is disabled? Otherwise amodule_exists('category')could be used.Comment #24
reynaldio commentedis it really worth it installing category modules with all of these bugs?
Comment #25
JirkaRybka commentedThis bug still stands for the 6.x version of Category, at least for the Forum module compatibility (I don't use Simplenews): With Category 6.x-2.0-beta2, a new Forum topic is created, but don't show up in the Forum listing. This is because Forum module works with the Taxonomy element in node forms' submitted data, which is missing - hence no placement of new topic in the Forum listings.
The fix for 5.x was created by bdragon - the patch at #9 above is still valid for 5.x (I would call that RTBC, if I had the time to check whether it still applies to latest 5.x code). I run it on a production site (Forum+Category) for almost 2 years, works quite well.
6.x needs a similar fix, but it doesn't work in hook_nodeapi($op='validate') anymore, as we don't get neither $node nor $form by reference ( node_validate() is the culprit), so we can't modify that. But there's even better way available: Basically what we need to do is to clone form values from 'categories' to 'taxonomy' on submit, for other modules to recognize/process/validate. The earlier we do that, the better. So I added a hook_form_alter() implementation, which inserts a new validation handler to the node form, using array_unshift() to ensure that it fires as first one. This way, our handler is called just after illegal form values were checked, but prior to other modules' handlers, so they all get the taxonomy element.
This fixed the Forum problem.
Additionally, it also fixed the problem with Forum selection validation, where Forum's "Containers" are not allowed to be used. Without this patch, Forum accepts these illegal choices, having no taxonomy to validate (Problem #2 at #117172: Analysis: Forum). With patch the category selector is still not red-outlined (as the error was filed against a non-existent taxonomy element), but apart from that, the form doesn't validate and prints correct error message, so I think it's OK.
6.x patch attached.
Related:
- 5.x patch (might be RTBC) is #9 above (only fixes the basic problem, not Forum validation). (#25 is unrelated - against Simplenews module.)
- #117172: Analysis: Forum is a summary of compatibility problems (5.x), with more fixes. I didn't check that one against 6.x yet. EDIT: Checked now, IMO there's nearly nothing to do for 6.x in that issue, as long as this and the below get fixed.
- #464542: Restore the ability to have pre-selected category on node/add also needs to be fixed for correct Forum posting workflow.
Comment #26
Jaza commentedLatest patch for the D6 taxonomy wrapper committed to HEAD. Thanks.