close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Email logging error

Thread begun 8/26/2020 9:07 am by Mags | Last modified 8/26/2020 12:37 pm by Ray Borduin | 680 views | 8 replies |

Mags

Email logging error

I've just added email logging to a registration form. The database table was autocreated, email is sending but I got a blank page after submission. Turned on error logging and got the attached errors - can't figure out what the problem is though. Can you help?

Sign in to reply to this post

Ray BorduinWebAssist

Please attach a copy of the page:
session-register.php

Most errors seem to come from there. I may be able to spot what is wrong.

Sign in to reply to this post
Did this help? Tips are appreciated...

Mags

Here it is.

Sign in to reply to this post

Ray BorduinWebAssist

This code is wrong on the top of the page:

php:
foreach($_POST as $event => $val) {

if(is_array($_POST[$key])) $_POST[$key] = implode(", ", $_POST[$key]);
}



The variable names don't match up. I think it should be:

php:
foreach($_POST as $key=> $val) {

if(is_array($_POST[$key])) $_POST[$key] = implode(", ", $_POST[$key]);
}



Line 53 you have:
$Email->onSend = new Email_Log("insert","email_log","EmailTo",$PowerCMSConnection_i);

I think it should be:
$Email->onSend = new Email_Log("insert","email_log","EmailTo",$Exclusives_i);

Delete your error log after making those changes and run it again. If you have more issues let me know and I can investigate further. Make sure to attach the updated version of the file in your response.

Sign in to reply to this post
Did this help? Tips are appreciated...

Mags

Updated error messages and page attached - still not logging in the database.

Sign in to reply to this post

Ray BorduinWebAssist

It looks like the log table wasn't created properly. I see the error:

paradigm_mort.email_log

You may have to create that table on the live database if it was created locally.

Also i see an error in the file: webassist/email/event-booking.php on line 8

I'd need a copy of that file to tell you what is wrong with it.

Sign in to reply to this post
Did this help? Tips are appreciated...

Mags

I just let Universal Email create the log table for me - it was created on the live database. I've attached a copy of the event-booking.php email. Have also included SFTP details in the PM.

Sign in to reply to this post

Ray BorduinWebAssist

Line 8 is:

php:
<p>Event: <?php echo ((isset($_POST["event"]))?implode(", "$_POST["event"]):"")?></p>


It needs to be:

php:
<p>Event: <?php echo ((isset($_POST["event"]))?(is_array($_POST["event"])?implode(", "$_POST["event"]):$_POST["event"]):"")?></p>



The FTP information provided doesn't seem to work for me. However I see in the log:
Table 'paradigm_mort.email_log' doesn't exist

Maybe the database name is wrong? The error seems to clearly state the table is missing from that database.

Sign in to reply to this post
Did this help? Tips are appreciated...

Mags

I just realised that I don't need the actual email log details so I just added a separate Insert Record behavior to the page and that gives me what I need. I will likely have an email log I'll need to build for another client though, so I may well be back in touch...!

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...