ez projects / enhancedezbinaryfile / forum / general / upload works, email fails
You need to be logged in to post messages in the forums. New users may register here.
|
Member since: Posts: 4 |
Friday 05 November 2010 9:01:06 pm I just installed enhanced eZ binary following the install instructions into my 4.3 installation. I am still relativly new at eZ Publish, so while trying to get upload to work I copied feeback_form.tpl from enhancedezbinaryfile/design/base/overrides/templates/full to the location of the feedbak_form.tpl that was being reported by the debugging "Show Used Templates" option.
At this point the file uploads, I believe succesfully, but I get the following error in my log and no email. Unknown file for post variable: ContentObjectAttribute_data_enhancedbinaryfilename_1012 Any help with template code for this extension or this error would be greatly appreciated. Thanks! |
|
Member since: Posts: 49 |
Sunday 07 November 2010 9:39:50 pm You did add the kernel hack to kernel/content/collectinformation.php, right? This is the code that is responsible for sending the mail...
If you did, check the mail logs to see if an attempt was made to send it which failed. (Or, am I misunderstanding and there is a mail being sent out, just without the attachment?) To make absolute sure that the files are uploading correctly, I assume you have access to the file system? You should be able to see the files in <storage_dir>/original/attachments/<type>/<hash>.<ext> by default (the original/attachments can be changed in the settings file). Judging by the error message, they shouldn't be uploading. Is the infocollector/view/<id> on the backend showing any collected information and the link to the file in the storage directory? If the file is there but the mail isn't being sent (or it is sent but the attachment isn't being sent), double-check the kernel hack. If an attempt to send the mail is made but it's not being sent, check the logs for a more specific reason it isn't arriving - it may be a bad setting. Certified eZPublish developer |
|
|
Member since: Posts: 4 |
Monday 08 November 2010 4:11:18 pm I did add the code to collectinformation.php
The mail logs would be in var/log/mail.log correct? My install hasn't created this log file. The file is correctly located in the upload folder with a name hash.ext When I was working with this Friday, no email was sent. Testing this morning generated an email with no attachment. This happens with .pdfs or .docs, both of which upload successfully. The Kernel Hack was added between the lines $mail->setSubject( $subject ); and $mail->setBody( $templateResult ); This is the 4.3 version of eZ Publish and the collectinformation.php portion of the kernel. Any advice on tweaks or lines to investigate in the kernel hack would be greatly appreciated. Thanks |
|
Member since: Posts: 49 |
Monday 08 November 2010 4:38:30 pm The kernel hack should be between lines 356 and 409 now... it looks like you put it in the correct place.
Things will be written to var/log/mail only if you set you [MailSettings] Transport=file - this would be a good thing to do to test - set this to file and see what gets generated and put in that directory - it should have the base64 encoded version of the attachment as part of the generated file. I meant check the mail logs of your machine, which would - depending on your system - be /var/log/mail.log. What I think is that if the kernel hack is correct and the files are being correctly uploaded to the storage directory, then the most likely problem after that is a misconfigured mail server and/or mail settings. Certified eZPublish developer |
|
|
Member since: Posts: 4 |
Monday 08 November 2010 5:31:30 pm Setting transport under mail settings to file, I get a .mail file with no attachment.
Opened with a text editor the contents look like this: To: myemailAddressremoved@myprovider.com Date: Mon, 08 Nov 2010 11:22:28 -0500 Subject: Collected information from Email Feedback Form From: myemailAddressremoved@myprovider.com Reply-To: myemailAddressremoved@myprovider.com MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Content-Disposition: inline User-Agent: eZ Publish, Version 4.3.0 The following information was collected: Sender name: OnceMore Subject: UntoTheBreach Message: Dear Friends Email: once.more@or.close.the.wall.up.english.dead.com Resume: The Game Rules.doc succesfully uploaded. |
|
Member since: Posts: 49 |
Tuesday 09 November 2010 7:49:13 am Since Content-Type is text/plain, that leads me to believe something failed with the kernel hack... specifically:
foreach ( array_keys( $contentObjectAttributes ) as $key ) { if ($contentObjectAttributes[$key]->DataTypeString == "enhancedezbinaryfile" ) { You might want to add some debugging statements to that part of the code, such as: eZDebug::writeNotice($contentObjectAttributes[$key]->DataTypeString . ' DataTypeString.' ); To try and figure out where it is going wrong. If that foreach loop doesn't find an attribute of type enhancedezbinaryfile in the collected information then the count($fileAttachments) will be 0 and the multipart stuff will never come into play. What version of php are you using? And, you are using the latest version of the extension? Certified eZPublish developer |
|
|
Member since: Posts: 4 |
Tuesday 09 November 2010 3:03:33 pm According to the readme the version is 1.0. Is that the latest version or do I need to look at a different file to determine which version? It was downloaded from projects.ez.no in the last two-three weeks.
I have been testing this functionality on systems with PHP 5.2 and 5.3. The results of the debug modifications tell me the following: Notice: Undefined index: first_param in htdocs/<site_name>/extension/enhancedezbinaryfile/autoloads/templateparsexmloperator.php on line 57 EDIT: Correction, this error is what I saw when enabling debug output. I don't see anything obvious related to the line of debugging code you provided when inserted below except a note about exceeding recursion depth |
|
|
Member since: Posts: 5 |
Thursday 16 December 2010 3:00:54 am Hi,
I am new to easy publish and i am having the same problem Upload works fine to the path var/siteaccess/storage/original/attachments/application/ but the problem is I did not find in the infocollector/view/<id> on the backend, the link to the file in the storage directory. The only collected information is a text message that the file was successfully uploaded. Any idea? Thanks in advance. Best regards. |
|
Member since: Posts: 49 |
Wednesday 22 December 2010 10:02:46 am Sorry, I didn't get updates on these messages.
@Hachem Osmani - see other forum post. @Eric Handler - did you manage to figure this out? Do you still care? Looking at line 57, the only thing that I can think is that one of the parsexml or filecheck calls in your template lost it's parameter... This is what got delivered: extension/enhancedezbinaryfile/design/standard/templates/content/datatype/result/info/enhancedezbinaryfile.tpl : 20:{$attribute.data_text|parsexml("OriginalFilename")|wash} {'succesfully uploaded.'|i18n( 'design/standard/content/datatype' )} 22: {if eq($attribute.data_text|filecheck,true)} 25:http://{ezini( "SiteSettings", "SiteURL" )}{$attribute.data_text|parsexml("Filename")|wash|ezroot(no)} 27: <br>{'Link'|i18n( 'design/standard/content/datatype' )}: <a href={$attribute.data_text|parsexml('Filename')|ezroot}>{$attribute.data_text|parsexml("OriginalFilename")}</a> Check those or any overrides that you may have done. Certified eZPublish developer |
You need to be logged in to post messages in the forums. New users may register here.