Hi,

Not sure if this is a bug.

I have installed and configured filemanager.
I ahave installed attachment but I can't find where to configure or even use attachment.

Nothing shows up under admin->settings
Nothing shows up when creating a new page (Like in upload module, one can attache files)
Attachement does get mentioned at the bottom of filemanager now.

php 5.04
Apache 2X
Mysql 4x
fedora core 1

Comments

drewish’s picture

Status: Active » Needs review
StatusFileSize
new4.38 KB

yeah, the drupal devs removed the hook_nodeapi 'form' op. the attached patch moves the functionality to a hook_alter_form() function.

i also had to make some changes to the attachment_form() function because it's now operating on the node at a less "fully formed" point.

drewish’s picture

StatusFileSize
new2.8 KB

I did some playing around and realized that it wasn't loading the existing files. Here's a patch that seems to work a little better.

After looking at some other parts of the module I realized cleaner change for attachment_form().

Ernie_’s picture

can someone post the module after patching ?
i can not run any patch

thks

Sartori’s picture

I've tried applying both patches - no error, but still no sign of any attachment options? :(

drupalxykon’s picture

you decide which attachment module to use under configure node types

drewish’s picture

Sartori, just to clarify what vrao said: after applying the second patch (to a clean copy of the attachment module), you'll need to go to admin/settings/content-types (if you're running a current version of CVS) and enable the attachment option. at that point, you should see an option in the node edit form.

i'd like to ask everyone, please test the patch i attached to comment #2 and leave feedback whether it worked for you or not.

graggrag’s picture

Just getting into this ... there seems to be a typo in line 23 that might account for the reports of the attachment option going missing. It uses '#default_value'=>variable_get('attachment_node_'. $node->type, 0), but $node doesn't exist at that code point.
Maybe change $node->type to simply $type?

drewish’s picture

StatusFileSize
new2.67 KB

graggrag, good catch on that. I've attached an updated patch. Please test it out and make sure it works.

graggrag’s picture

Title: Where is Attachment option? » Attachment with attachment.module_hook_nodeapi_0.patch

Hi, that one's cool I think, but overall it's still kinda funky. No, that's not an explicit bug report. First thing I noticed with today's cvs is that Add always reports 'No file selected' even though the file seems to process.

drewish’s picture

graggrag, that sound like the same error reported by one of the users of my filemanager based module... would you mind describing the versions of software you're running, mainly Drupal and the webserver.

graggrag’s picture

Title: Attachment with attachment.module_hook_nodeapi_0.patch » my versions of software ...

Apache/2.2.0, php-5.1.2, Drupal 4.7.0-beta4 and a cvs from today (both suffer).
Filemanager is cvs on 2006-01-24, shows 1.12 2006/01/16.

drewish’s picture

Title: my versions of software ... » Where is Attachment option?

[resetting the title. for what ever reason with the project module, when you set a comment's title it changes the issue's title]

graggrag, it might be easiest to try to debug this off thread. you don't have your contact tab enabled so maybe you could contact me instead?

ccourtne’s picture

Status: Needs review » Fixed

Thanks for the patch. I have applied it to my working tree and will check it in soon.

Anonymous’s picture

Status: Fixed » Closed (fixed)