Hi, thank you for this very useful module.
Do you think you will release a 6.x compatible one ?

CommentFileSizeAuthor
#2 search_block_port_to_D6.patch12.94 KBgrobemo

Comments

deviantintegral’s picture

I would like to at some point, but all of my current projects are in D5, so I don't have a lot of time to find out what changes need to be made. If someone submits a patch I'll be glad to review / apply :)

--Andrew

grobemo’s picture

Status: Active » Needs review
StatusFileSize
new12.94 KB

I've ported the module to Drupal 6. It seems to work pretty well. This is my first time submitting a patch. I think I've followed all of the directions for doing so, but let me know if I've erred in some way.

The patch updates search_block.info, search_block.install, and search_block.module. Aside from introducing the new Schema API into the install file, there are no major changes—just little things to make the code compatible with D6.

thermador’s picture

It would be great if you could post the v6.0 update as a new module...dev or beta or whatever... for those of us who are not as technically inclined. ;-)

deviantintegral’s picture

Thanks for the patch!

I'll be creating a new branch soon, I just need to read over the code, especially as I'm not totally familiar with all of the D6 changes. I also want to make sure that it will be fairly simple to keep updates in sync for both versions of the module.

--Andrew

deviantintegral’s picture

Version: 5.x-1.0 » 6.x-1.x-dev

I've committed this to CVS. Please give it a try and if if it seems stable I'll mark a -1.0 release.

--Andrew

thermador’s picture

Ok, I gave it a full run through. Here's what I'm using:

Drupal 6.2
MySQL database 5.0.51a
PHP 5.2.5
Theme: Customized version of Minnelli

Modules:
Access Control
- ACL 6.x-1.x-dev
- Forum Access 6.x-1.x-dev
CCK 6.x-2.0-beta (all modules)
Content Profile 6.x-1.0-beta2
Drupal Core - Optional Modules
- Color 6.2
- Comment 6.2
- Database logging 6.2
- Forum 6.2
- Help 6.2
- Menu 6.2
- Poll 6.2
- Profile 6.2
- Search 6.2
- Statistics 6.2
- Syslog 6.2
- Taxonomy 6.2
- Update status 6.2
- Upload 6.2
Mail
- Simplenews 6.x-1.0-beta3
- Simplenews action 6.x-1.0-beta3
Other
- Advanced help 6.x-1.0
- Login Destination for Drupal 6.2 6.2-20080618.1
- LoginToboggan 6.x-1.2
- Node Privacy By Role 6.x-1.2
- Persistent Login 6.x-1.4-beta2
- Poormanscron 6.x-1.0
- TinyMCE 6.x-1.1-dev
- Webform 6.x-2.1
Search
- Restricted Search 6.x-1.x-dev
Spam Control
- CAPTCHA 6.x-1.0-rc2
- CAPTCHA Pack 6.x-1.0-beta2
Views
- Views 6.x-2.0-beta4
- Views exporter 6.x-2.0-beta4
- Views UI 6.x-2.0-beta4

Here's what I did:
Copied the CVS files to sites/all/modules/search_block/
Enabled the module
Enabled administrator permissions on the module

Went to the Search Settings in the Admin Panel
Clicked on "Restrict Search" Tab
Set all Content to "Allow Search" -> Save

Created a new content type called "Hidden Page" and set it to globally restrict searches in the workflow settings for the content type
Created a new "Hidden Page" with some text on it that I could search for later

Went to an different existing page that I wanted to make restricted from search -> "Edit" Tab
Went to the "Restricted Search" settings and checked the box to restrict the page from search.

Went back to Search Settings in the Admin Panel
Re-indexed the site
Ran cron manually

Tried searching for the Hidden Page content - result: nothing found!
Tried searching for the content on the existing page that I made restricted - result: nothing found!

I'd say your module works great. Publish that CVS!

deviantintegral’s picture

I'm still going over the new schema API, but as is I don't see a migration path for the database table for those upgrading from 5 to 6? That's something that should probably go in before releasing a stable.

--Andrew

s.daniel’s picture

Thanks for your module :)

Tested the modul localy on XAMPP using a fresh install (added a few nodes and activated admin_menu devel and dhtml_menu) and after I rebuilt the search index it worked, however I see following errors:

When I navigate using admin_menu I have following Menu structure:
-Site configuration
--Search settings | admin/settings/search
---Main | admin/settings/search/main
---Restrict Search | admin/settings/search/restrict

/admin/settings/search/main fails to load with error message:
Fatal error: require_once() [function.require]: Failed opening required 'sites/all/modules/search_block/search.admin.inc' (include_path='.;C:\Programme\xampp\php\pear\') in C:\Programme\xampp\htdocs_dev_localhost\includes\menu.inc on line 344

On page /admin/settings/search/restrict i get this error messages (not every time I visit the page but after I visited "main"):

    * warning: require_once(sites/all/modules/search_block/search.admin.inc) [function.require-once]: failed to open stream: No such file or directory in C:\Programme\xampp\htdocs_dev_localhost\includes\menu.inc on line 344.
    * warning: require_once(sites/all/modules/search_block/search.admin.inc) [function.require-once]: failed to open stream: No such file or directory in C:\Programme\xampp\htdocs_dev_localhost\includes\menu.inc on line 344.

It also shows me the options:

Restrict search results by node type.
ok Page:
[ ] Allow Searches
[ ] Restrict Searches
ok Story:
[ ] Allow Searches
[ ] Restrict Searches

Bottomline is - it seems to work generally but there are some bugs left.

deviantintegral’s picture

Status: Needs review » Fixed

@s.Daniel: Your problem is definitely with your local install. You'll notice that it's looking in the wrong spot for include files; this module doesn't do anything with include files in any way.

I'm going to tag a -stable once #229199 is closed. If you can replicate the problem on other systems, please open a new issue.

Thanks!
--Andrew

Anonymous’s picture

Status: Fixed » Closed (fixed)

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