Drupal 6.x upgrades
lomz - February 16, 2008 - 22:39
| Project: | Filter Default |
| Version: | 5.x-1.x-dev |
| Component: | Code |
| Category: | task |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Description
Will this module be ported to 6.0
| Project: | Filter Default |
| Version: | 5.x-1.x-dev |
| Component: | Code |
| Category: | task |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Will this module be ported to 6.0
#1
I'm going to talk to the maintainer about this. I just did a port of this module that works for me in very limited testing, so I'll see if we can get this into CVS.
#2
Okay, here's a patch for the main module file that will make this work in Drupal 6. I've only tested it on one Drupal 6 site, but it seems to work as expected.
To use this, you'll also need to add core = "6.x" to your .info file.
#3
Does any-one know when a version for D6 is going to be published ?
This feature is very handy and it is a miss in Drupal core.
#4
Changed to support request. Most other modules have D6 port issues as support request.
I patched 5.x-1.x-dev with patch #2. Installed perfectly. Created content with various content types. No issues.
Need a few more testers.
#5
@chellman: Did you talk to the maintainer about this? Any requirements for a dev release for this module?
#6
The maintainer is aware of this patch, and that this was the issue to which I attached it. But as to when a new release will be spun, I'm not sure.
#7
Update: This is still running beautifully for me...no issues at all.
#8
subscribing, is the maintainer still active? maybe he can release some stable versions for 5.x and 6.x
#9
subscribe
#10
Patch is fine. Running fine on my site. I did a review. It is clean. Found a mistake in both the 5 and 6 version in the help text on line 30 after the patches. Instead of admin/settings/filters it has admin/filters. I will submitted a ticket on that.
Thanks
Robert
#11
Patch is clean and great!
But why maintainer does not release?
hmm... maintainer doesn't managing?
#12
That means the patch either doesn't include the core = 6.x in the .info file or the patch wasn't updated from 6.0,6.1 when 6.2 comes up.
#13
#14
Edit: @Robert: your right, thanks!
#15
grios,
That doesn't mean the maintainer is active or inactive it means he hasn't made a change in sometime. He may be active in other projects and just hasn't felt there was a need to make any changes to this project in some time. In fact a quick check of the author shows he is very active and that he is in the process of getting something committed into core right now.
Thanks
Robert
#16
Thanks to this patch, it made my job of porting easier. I did a complete package for a Drupal 6 port that has optimised code using page handlers with a PHP memory usage of about 15400 bytes. As I do not have a patch program, I had to do the changes manually so if anyone finds a problem somewhere, do report it if possible, thanks.
#17
Doesn't seem to work with posts coming in through blog_api. They are still using filtered.
#18
If you take a look at the code you will see that this alters the node and comment forms, it has nothing to do with stuff that is not submitted through Drupal's form system.
#19
Saw that. I added the following hook to fix it:
<?php/**
* Implements hook_nodeapi()
*/
function filter_default_nodeapi($node, $op) {
if ($op == "blogapi new" || $op == "blogapi edit") {
global $user;
$roles = user_roles();
for ($i = 1; $i < count($roles)+1; ++$i) {
list($role, $format) = variable_get('filter_default_'. $i, array());
if (array_key_exists($role, $user->roles)) {
$node->format = $format;
break;
}
}
}
}
?>
#20
I have tested with the comment #16 patch (by atuyo60) with 'admin/filters' changed to 'admin/settings/filters' in the filter-default.config.inc file and also added the filter_default_nodeapi function.
I can now use an external blog posting software and still get the correct filter applied for a given user.
#21
hmm thanks for that bug report...
Change line 28 of the filter-default.config.inc file to:
array('!list_link' => l('list tab', 'admin/settings/filters'))));and replace %list_link with !list_link in line 27
#22
As far as I can tell I've made all these changes, but when I post from Windows Live Writer, it always posts with "filtered HTML." I'm using an Admin account to do the posting and Admin's default filter is "Allow All HTML." When I add content through the website, the input form is correctly set to "Allow all HTML," but not through WLW. Any suggestions as to what else to try? Thanks! Dave.
#23
Well, I probably should mention that when I added the filter_default_noapi function, I get this error whenever I try to add content:
Fatal error: Cannot redeclare filter_default_nodeapi() (previously declared in [dir]/sites/all/modules/filter_default/filter_default.module:91) in [dir]/sites/all/modules/filter_default/filter_default.module on line 91
It looks like it thinks I'm redeclaring it even though it says it was declared in the same place! When I comment out the function it doesn't get the error, but I can't get the default to get set to allow full HTML.
#24
Sorry about the three posts. Anyway, I moved the filter_default_nodeapi function to the top of the .module file and I stopped getting the error. I also found that if I "Publish" the post to drupal it works. If I save it as a draft to drupal (which is what I had been doing since I was trying to test the filter), it didn't work. It would leave the input as "filtered HTML" rather than full. I guess I'll just always publish...and be quite happy with using WLW to do it! Thanks guys.
#25
This needs to be included in the core.
Any plans to roll it into a real 6.x module?
#26
Yes, I'm now a maintainer of the module. Once I've finished reading the CVS documentation on how to roll releases and so forth, I'll be rolling a 6.x release and making some changes to 5.x as well. This should be within a week or so.
#27
chellman,
CVS in drupal is pretty straight forward. Here is the quick start guide http://drupal.org/handbook/cvs/quickstart. I am anything but a CVS expert but if you have any questions ask.
Thanks
Robert
#28
subs
#29
Subscribing
#30
Hmmm. I just attempted to apply the patch in #2 and 5 out of 6 hunks failed.
dave@linux-9o4a:~/public_html/oa/sites/all/modules/filter_default> patch < filter_default_d6.patch
patching file filter_default.module
Hunk #1 FAILED at 1.
Hunk #2 FAILED at 30.
Hunk #3 FAILED at 66.
Hunk #4 FAILED at 77.
Hunk #5 succeeded at 129 (offset 4 lines).
Hunk #6 FAILED at 148.
5 out of 6 hunks FAILED -- saving rejects to file filter_default.module.rej
On further inspection its because the original patch included some code formating changes that have since been rollled into HEAD seperately.
Here is a re-roll of the patch including the necessary changes to the .install and README.txt files.
#31
Thanks for the patch, dalin. I'll be reviewing this soon. I'm realizing that there's no HEAD as such right now — the 5.x-dev version is functioning as HEAD, so the changes I made to that the other day apparently broke the original patch. This will be helpful as I get the 6.x branch going, which will be soon.
#32
@chellman It might be more helpful to look at it the other way around. There is always a HEAD in CVS. Right now the 5.x-dev version is being generated from HEAD. And before you create a branch for DRUPAL-6--1 you should create a branch for DRUPAL-5. Actually do them at the same time, but then you will probably never touch the 5 branch again (only to perhaps generate a DRUPAL-5--1-0 tag for a real drupal 5 release). Then you can work off the 6--1 branch and remove all files from trunk until you're ready to start work on Drupal 7. Forgive me if I'm telling you stuff you already know.
#33
Okay, put on your party hats, because I've just spun a 6.x dev release and a stable 5.x release. The 6.x release is based on my and dalin's work. Download and test, if you please.
atuyo60, I'm interested to look at your work, but in order to use it, you'll have to submit it in the form of a patch. Take a look at how to make patches,
I'm marking this issue fixed because there is a release, but feel free and encouraged to submit new issues with bugs and feature requests.
#34
I cant see that the 6.x is downloadable yet..
#35
This is what one gets for having a first-time maintainer doing this. I've just updated the project's page so the release shows up — you could have found it on the releases page, but certainly I wasn't expecting anyone to need to look there.
#36
actually I looked at the view all releases page earlier on as well but it was not there also
#37
It's possible you looked a little too early. Development releases are built in a twice-daily cron job (as opposed to stable releases, which happens every 5 minutes), so it might not have been there yet. Hopefully you'll see it now; I do.
#38
Automatically closed -- issue fixed for two weeks with no activity.
#39
The filter wont work for me, some roles still get filtered html as default. Im using D6.5
#40
Have set the weights of the different roles in correct order?
#41
works absolutelly great for me in drupal 6.6, thanks !
This should definitelly be in core.Simple and clean.
#42
Ya that patch works awesome, should be patch and released as a 6.x version! If the maintainer is worried about it just release it as a RC.