Closed (fixed)
Project:
Sections
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
14 Dec 2004 at 01:58 UTC
Updated:
29 Sep 2006 at 13:15 UTC
Jump to comment: Most recent file
I tried out the module on my CVS install of Drupal.
The theme select dropdown in settings/section/add or settings/section/edit does not contain any values.
system_theme_data does not return anything called $obj->shortname.
This patch grabs the $obj->name and assigns it to the $options[$key]
andre
| Comment | File | Size | Author |
|---|---|---|---|
| #8 | sections-46-update.patch | 1.63 KB | TDobes |
| #6 | section_1_nix.patch | 563 bytes | andremolnar |
| section_1.patch | 579 bytes | andremolnar |
Comments
Comment #1
Bèr Kessels commentedit was made for 4.5 and has not been adjusted to work with HEAD yet.
But the patch does not apply.
Comment #2
andremolnar commentedIF it were adjusted for head - would this patch be correct. I have no other way of testing this module.
$themes = system_theme_data('themes'); currently returns an array with items in the following format
thanks
andre
Comment #3
Bèr Kessels commentedyour patch does not apply, I tried it, and that has little to do with bieng HEAD or 4.5, since HEAD msections.module == 4.5 sections.module.
I think you are usting the wrong line endings. please use unix endings only, as is required in Drupal coding guidelines.
Bèr
Comment #4
andremolnar commentedSorry - miscommunication:
I thought that you meant that this patch does not apply (in the sense that it is not needed)
I suppose you are meaning to say you cannot apply the patch.
I will see what I can do about the format - I am on a windows system using wincvs to generate the diff (diff -u -F^f ).
andre
Comment #5
Bèr Kessels commentedindeed. I meant that this (and previous sections patches) cannot be applied. my pathcing system gets errors.
the drupal handbook has good sections on Diff and PATCH.
Comment #6
andremolnar commentedupdate to patch for *nix file format.
Comment #7
(not verified) commentedI'm having this issue as well. :/ I tried using the patch, but it didn't work for me. Any news?
Comment #8
TDobes commentedHere's a better patch to make sections.module work with 4.6. It uses list_themes rather than system_theme_data. This has the advantage of not requiring Drupal to load each and every theme for every page on which _sections_theme_select is called. This also removes the requirement that the ability to switch to a theme be enabled for users before it is presented in the sections UI. This restricting is not ideal, as it prevents admins from creating sections with special themes that are not for normal use.
This patch also removes the _init hook, which is no longer necessary due to a recent improvement to the theme system. It is better to use the _menu hook, as it is called only for non-cached page views. This also fixes a bug in which the ability for users to switch themes using their "my account" page was defeated by this module.
Comment #9
beate_r commentedunfortunately, the sections.module as downloadable from cvs still contains the old code from december 2004. after some time of fiddling around with the code i arrived at the shortname/name mod by myself
(i was not aware of this thread).
replacing shortname by name in _sections_theme_select
basically works in my setup [multihost (multiple aliases to two drupal instances using single database with prefixed table names), and drupal residing in subdirectory].
In addition i will also try the 2nd more elaborate patch given here ASAP.
So Ber, would You please update Your CVS in order to make the sections.module usable.
And publish it officially for 4.5 as well as for 4.6.x (with one of the two patches applied), the module is great as it is!
And no one will prevent You/us to apply better ideas in the future.
Best regards,
Michael
Comment #10
chueewowee commentedpatch < sections.module sections-46-update.patch
patch unexpectedly ends in middle of line
patch: **** Only garbage was found in the patch input.
[chuees-Computer:drupal/modules/sections] chuee%
Comment #11
nathanwastaken commentedchanging shortname to name works fine for me as well.
Ber, I have a CVS account, if you are to busy to deal with this, I would be willing to take over (for the short term), to get it working in 4.6 and 4.5.
I am no 'hot shot' coder, but I think there are plenty in the community who would be willing to lend a hand. *looks through thread at many contributed patches*.
Just a thought. The offer is always there.
Comment #12
Bèr Kessels commentedsolon, could you please first contribute your patch? then I can have an idea awhat you are up to ;). Not that I dont trust you, the fact you ask beforehand is a very good sign, but I have had bad experiences with people seriously breaking my modules without even asking me anything.
Hence I would like to see what your plans are :)
Comment #13
jessZ commentedthe patch posted at top (and reposted below) worked for me with Drupal 4.60 installed in a subdirectory using a fantastico script
I agree that this module seems to work as well or better than most that are posted as 4.6 ready and I think it's a crucial one for a site to develop visual variety. Ifit were promoted for general use I think more folks would chime in and debug it.
Thanks for creating it.
jessz
Index: sections.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/sections/sections.module,v
retrieving revision 1.1
diff -u -F^f -r1.1 sections.module
--- sections.module 15 Nov 2004 19:32:13 -0000 1.1
+++ sections.module 14 Dec 2004 01:42:36 -0000
@@ -211,7 +211,7 @@ function _sections_theme_select() {
foreach ($themes as $key => $info) {
if($info->status) {
- $options[$key] = $info->shortname;
+ $options[$key] = $info->name;
}
}
return $options;
Comment #14
Bèr Kessels commentedfixed in HEAD, thanks for the patch!
Comment #15
Bèr Kessels commentedComment #16
(not verified) commented