Jump to content


[Snippet] kMail 1.1


31 replies to this topic

#16 WP1

    Etomite Forum Fan

  • Member
  • Pip
  • 104 posts

Posted 30 January 2008 - 01:48 PM

Hello!

It is unclear from looking at the script and in discussion forums if the snippet should be called:

[1] Uncached mode [!kMail!] or
[2] Cached mode [[kMail]]

QUESTION
Could anyone help me with this so that I know if I am calling this script properly?

Thanks in advance,

WP

#17 Ralph

    Loves Etomite Forums!

  • Admin
  • 6,506 posts
  • Gender:Male

Posted 30 January 2008 - 02:12 PM

View PostWP1, on Jan 30 2008, 08:48 AM, said:

Hello!

It is unclear from looking at the script and in discussion forums if the snippet should be called:

[1] Uncached mode [!kMail!] or
[2] Cached mode [[kMail]]

QUESTION
Could anyone help me with this so that I know if I am calling this script properly?

Thanks in advance,

WP

Any snippets which work with Dynamic content, such as forms, should always be called as an un-cached snippet... The reason behind this is that a cached snippet has the results from the first time it is run within a cached page cached along with the page markup itself... This means that any subsequent calls to the page will return the same results as the when the first iteration was cached... So, in the case of a form, none of the form inputs would ever get processed because the document is rendering markup, not running the snippet code itself...

#18 katherholt

    Likes Etomite Forums!

  • Member
  • PipPip
  • 323 posts

Posted 30 January 2008 - 02:28 PM

View PostWP1, on Jan 30 2008, 07:48 AM, said:

Hello!

It is unclear from looking at the script and in discussion forums if the snippet should be called:

[1] Uncached mode [!kMail!] or
[2] Cached mode [[kMail]]

QUESTION
Could anyone help me with this so that I know if I am calling this script properly?

Thanks in advance,

WP

I use it this way:
[!kmail!] - plus the cache on my page is turned 'off'. You can see it in use here:
http://www.villarica.org/contact-us.html
Karen

#19 smartie

    Etomite Forum Newbie

  • Member
  • 11 posts

Posted 14 February 2008 - 06:06 PM

Hi,

Problem:
kmail does not deliver the subject

Solution:
in kmail snippet you have to change some variables.
search for:
'%mailSendSubject%'
and replace it with
'%mailSubject%'

search for:
$mail_SenderSubject
and replace it with:
$mail_Subject

in your chunks open kmail-email
now you can add a line like: Subject: %mailSubject%

#20 Guest_thomass_*

  • Guests

Posted 18 February 2008 - 01:19 PM

Everytime i fill in het form, put the right captcha-code, i get back the message 'The security question is answered wrong!' The cache is turned off, and i call the snippet [!kmail!]. Does anyone have the solution? Thanks-a-lot

Edited by thomass, 18 February 2008 - 01:19 PM.


#21 Ralph

    Loves Etomite Forums!

  • Admin
  • 6,506 posts
  • Gender:Male

Posted 18 February 2008 - 02:14 PM

View Postthomass, on Feb 18 2008, 08:19 AM, said:

Everytime i fill in het form, put the right captcha-code, i get back the message 'The security question is answered wrong!' The cache is turned off, and i call the snippet [!kmail!]. Does anyone have the solution? Thanks-a-lot

What release of Etomite are you running...???

#22 Dean

    Loves Etomite Forums!

  • Admin
  • 4,746 posts
  • Gender:Male

Posted 18 February 2008 - 06:40 PM

Ah - Did you actually check the snippet code, to make sure that captcha is actually on. I know that if it isn't, it displays a captcha image that doesn't work.

#23 sandra-ch

    Etomite Forum Newbie

  • Member
  • 43 posts

Posted 12 March 2009 - 07:52 PM

hi

i get an error after sending the form: 404 page not found
the adress and the id is the one of the contact form

if i click on the back button the page is displayed whith the notice of the chunk {kmail-alreadysent}.

somebody has an idea where the problem is?

Etomite Version 1.1 (Prelude)
Server Linux

#24 Cris D.

    Loves Etomite Forums!

  • Developers
  • PipPipPipPip
  • 1,104 posts
  • Gender:Male

Posted 12 March 2009 - 09:06 PM

Is the email successfully being sent?
Have you modified the snippet other than adding the configuration items in the top of the snippet?
Was it working and stopped working or is this a fresh installation?

#25 Ralph

    Loves Etomite Forums!

  • Admin
  • 6,506 posts
  • Gender:Male

Posted 13 March 2009 - 01:06 PM

I haven't looked at the snippet code but it sounds to me like there may be a redirect on success in the code that is pointing to a non-existent page... The success page on Back is probably only there to eliminate the possibility of double-sending... Just a hunch...

EDIT: I looked...

The non-existent page be:
Line 5: $thxPageId = 55; // page id of the thank you page

Also check:
Line 6: $errPageId = 56; // page id of the error page

And
Line 4: $kmail_LogDocument = 57; // log document id

#26 sandra-ch

    Etomite Forum Newbie

  • Member
  • 43 posts

Posted 13 March 2009 - 08:24 PM

Hi Cris D.
Hi Ralph

i tried it with the original script and only changed things in the header but with the same effect.
the chunks are made.
the e-mail is sent.
the log is written in.
the ids of the pages are correct, i even set in the manager the number.
all the mentioned pages are set online.


$kmail_Subject = 'mail from ssandra'; // mail subject
$kmail_fromMail = 'xy@gmx.ch'; //e-mail adress, will be used in the FROM header
$kmail_MailLog = true; //logging?
$kmail_LogDocument = 65; // log document id
$thxPageId = 63; // page id of the thank you page
$errPageId = 64; // page id of the error page
$kmail_maxMailLength = 1024; // max length of the email in chars
$kmail_SpamProtect = 20; // flood protection (in seconds)
$useCaptchaCode = true; // use the captcha codes or captcha numbers


// email adresses - the names
$receiverNames = array (
'ssandra',
);
// email adresses - yes - the adresses ;-)
$receiverMails = array (
'xy@gmx.ch',
);
the rest of the script i didnt touch

thanks for help.

Edited by sandra-ch, 14 March 2009 - 08:01 PM.


#27 Cris D.

    Loves Etomite Forums!

  • Developers
  • PipPipPipPip
  • 1,104 posts
  • Gender:Male

Posted 14 March 2009 - 03:52 AM

Quote

i even set in the manager the number.
What exactly does this mean? How can you set the number?? Do you mean you are trying to change the number of a document by adding it to the alias text box or something else? The page ID is created at the time the page is created and can not be changed (or set). Unless you are referring to setting the page ID's in the snippet configuration or changing a document's parent...

If that is not the issue, then...I think a hands-on approach would be the fastest way to diagnose this. If you PM a site details I am happy to have a look, I can't speak for Ralph, but he rarely refuses also, it depends on what time zone you live in. Fortunately when Ralph's asleep I'm up and visa versa.

Off the top of my head, this could be the .htaccess file, FURL's, Friendly aliases, published status, or human error (page ID's not matching). I don't think it is a snippet problem if all you have done to it is what you have mentioned above, it's a well tried and tested snippet.

By the way, I would edit your post above to remove your email address to avoid spam from crawlers.

#28 Ralph

    Loves Etomite Forums!

  • Admin
  • 6,506 posts
  • Gender:Male

Posted 14 March 2009 - 01:45 PM

I think we're onto something here... sandra-ch, it sounds like you're thinking that the snippet uses a documents menuIndex rather than the document id... Make sure you are using document id and not menuIndex because they never change... If a snippet used menuIndex to grab documents then you could end up with unexpected results if a document was dragged and dropped for reordering... If this isn't the case then fine, but it sounds like you're using the wrong numbers and the numbers you are using point to unpublished documents within the doc tree...

Feel free to PM me login spec's if you like and I'll take a hands-on look at things...

#29 sandra-ch

    Etomite Forum Newbie

  • Member
  • 43 posts

Posted 14 March 2009 - 08:11 PM

hi Cris D.

thanks for the hint about the e-mail adress, i changed it.

hi Ralph

i took your offer and sent you the login as a pm.

thanks again to you both

#30 Ralph

    Loves Etomite Forums!

  • Admin
  • 6,506 posts
  • Gender:Male

Posted 14 March 2009 - 11:02 PM

View Postsandra-ch, on Mar 14 2009, 04:11 PM, said:

i took your offer and sent you the login as a pm.

The kmail 404 problem has been resolved...

The problem was not due to the snippet itself but, rather, due to the fact that FURL's had been enabled within the Etomite configuration panel without ht.access being renamed to .htaccess... When makeURL() was creating FURL's and sendRedirect() was sending them to the server, the server was unable to parse them and therefore threw a 404 error... The server was doing what it knew how to do... Once the .htaccess file was active the server was able to handle the FURL requests properly...

The kmail 404 was only a symptom, not the problem... ANY makeURL() + sendRedirect() combination would have resulted in a 404... The menu snippet being used must contain a quirk because it will only create Friendly Aliases and not standard Friendly URL's, otherwise the true problem would have been blatantly evident as all URL's would also have resulted in a 404...

This is a prime example of how the source of the problem may reside somewhere other than the initially suspected location...

#31 sandra-ch

    Etomite Forum Newbie

  • Member
  • 43 posts

Posted 15 March 2009 - 01:03 AM

thanks for the fast help :blush:

#32 cathode

    Loves Etomite Forums!

  • Staff
  • 648 posts
  • Gender:Male

Posted 17 April 2009 - 03:00 PM

I am looking at this snippet for the first time - the documentation is slim-to-none. Can someone post a simple step-by step?

1) Make the chunks kmail-alreadysent, kmail-contact, kmail-email, kmail-log
2) Upload the php file (WHERE?)
3) Make (WHAT?) modifications to the chunks
4) Make (WHAT?) modifications to the php file
5) Call (WHICH CHUNKS?) into the contact page

Thanks!





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users