----- Original Message ----- From: "Justin J" justin@PROTECTED To: "[list_settings list_name] Subscriber" f.gouverne@PROTECTED Sent: Tuesday, April 21, 2009 11:10 PM Subject: [dadadev] Re: Default Values for New Lists
>
At 3:45 PM -0400 4/21/09, Frans Gouverne wrote:
Did you select a list to clone? If so, does the error also shows up when you do not clone? Is there a string named "864313574052" somewhere in your config file? Do you use your existing data base, or did you create a new one? I suppose you use SQL? Are you able to check if there is a setting named "864313574052" in your dada_settings table, e g by using phpadmin?
Fixed You were right, I found the string named "864313574052" in the mySql Db
Frans, to stop this type of thing, this is what I've been doing: In your code in the dada/DADA/MailingList pm file
http://github com/zwerfkat/dada-mail-3 0 x/blob/7365a75f5f27ca77c1706298810c77487fbb9425/dada/DADA/MailingList pm
you can change:
if ( exists( $args->{ -clone } ) ) { my $clone_ls = DADA::MailingList::Settings->new( { -list => $args->{ -
clone }, } ); my %to_clone = %{ $clone_ls->params }; foreach (@DADA::Config::LIST_SETUP_DONT_CLONE) { if ( exists( $to_clone{$} ) ) { delete( $toclone{$} ); } } %{ $args->{ -settings } } = ( %toclone, %{ $args->{ - settings } } ); }
$ls->save( $args->{ -settings } );
To:
if ( exists( $args->{ -clone } ) ) { my $clone_ls = DADA::MailingList::Settings->new( { -list => $args->{ -
clone }, } ); my %to_clone = %{ $clone_ls->params }; foreach (@DADA::Config::LIST_SETUP_DONT_CLONE) { if ( exists( $to_clone{$} ) ) { delete( $toclone{$} ); } } %{ $args->{ -settings } } = ( %toclone, %{ $args->{ - settings } } ); }
New!
foreach(keys %to_clone){ if(! exists($DADA::Config::LIST_SETUP_DEFAULTS{$})){ warn "Skipping setting: $ in clone "; delete( $to_clone{$_} ); } }
/New!
$ls->save( $args->{ -settings } );
Thanks, that almost worked: you have to be sure the new part is inside the "if ( exists( $args->{ -clone } ) ) { }" block, otherwise variable "%to_clone" is undefined which leads to a program error if you do NOT clone a list
That'll just make sure you're only copying over settings that are presently used and it'll leave the old ones alone I made the, "unregistered settings!" error, since I was having trouble with mis- spelling the names of the settings and a lot of bugs started cropping up
-- Justin J
Start a new thread, email: dadadev@dadamailproject.com
This is the developer discussion mailing list for Dada Mail.
If you are just looking for support Dada Mail, consult the message boards at:
https://forum.dadamailproject.com
Documentation for Dada Mail:
Specifically, see the Error FAQ:
https://dadamailproject.com/d/FAQ-errors.pod.html
To post to this list, send a message to:
mailto:dadadev@dadamailproject.com
All subscribers of this list may post to the list itself.
Topics that are welcome:
Dada Mail is on Github:
https://github.com/justingit/dada-mail/
If you would like to fork, branch, send over PRs, open up issues, etc.
This Privacy Policy is for this mailing list, and this mailing list only.
Email addresses collection through this mailing list are used explicitly to work within this email discussion list.
We only collect email addresses through our Closed-Loop Opt-In system.
We don't use your email address for any other purpose.
We won't be sharing your email address with any other entity.
Unsubscription can be done at any time. Please contact us at: justin@dadamailproject.com for any help regarding your subscription, including removal from the mailing list.
All mailing list messages sent from us will include a subscription removal link, which will allow you to remove yourself from this mailing list automatically, and permanently.
All consent to use your email address for any other purpose stated at the time of the mailing list subscription will also be revoked upon mailing list removal.