per subject :)

Comments

jerdavis’s picture

Yup! It's on it's way!

HEAD is already ported and seems to be working well based on testing, although it's lacking views support currently. As soon as we get views support in we'll create a d6 branch and post a development snap shot.

For now if you'd like to try it out please do so and let us know if you run into any issues!

Jer

mradcliffe’s picture

StatusFileSize
new1.4 KB

I had some free time today so I converted it to views 2.x, mostly. Arguments and send_totals not in there yet. No default views either. I replaced most of the uid handlers with relationships to their respective tables as they are redundant.

Completed the send_views_handler_*_module classes for filter and field. Again arguments are a bit weak right now and could use some work.

Attachment contains send.views.inc, includes/, and a patch to send.module for the missing send_views_api() stuff.

Wasn't sure whether to post here or in #274104: An Upgrade to drupal ver 6.x??. One or the other is a duplicate, but this had a bit more status info.

greggles’s picture

Category: support » task
Status: Active » Needs work

A more approriate status...

mehmeta’s picture

Just got it working with the latest snapshot(6.x-1.x-dev) of Send and mimemail(6.x-1.x-dev). Required me to change to lines

return addslashes(mime_header_encode($address['name'])) .' <'. $address['mail'] .'>';

to

return '<'. $address['mail'] .'>';

in mimemail.inc, since php's mail function didn't seem to like addresses with the "%username" <%email> format.

one51’s picture

Any update on the status? Just setting up a Drupal website, and this functionality is one that I am most looking for. Cheers!

RyanJLind’s picture

Does this officially work with Drupal 6? I can't seem to get it set up. For example, I don't see anything under content types that allows me to add the mail a friend link to that content type. INSTALL.txt is out-of-date as it tells me to go to admin/settings/content-types which doesn't exist anymore. I also get a lot of MySQL warnings/errors

Appreciate any response

Thanks.

damienmckenna’s picture

I've been trying to migrate a D5 site to D6 and am hitting some errors. I'll dig into it and report what I can find.

damienmckenna’s picture

Here's the error that's given when I do an upgrade from D5 to D6:
An error occurred. http://mysite/update.php?id=1&op=do <br /> <b>Fatal error</b>: Call to undefined function send_value() in <b>sites/all/modules/contrib/send/send.install</b> on line <b>258</b><br />

damienmckenna’s picture

The D5-D6 error occurs on this line:

    send_value('template', NULL, NULL, NULL, $template->stid);

This is part of the _send_install_set_default_template() function which is called from send_update_6003().

For the same reason as FeedAPI found in #576848: Don't use module API in hook_update_N(), a module's own APIs should not be used within the install and update functions.

damienmckenna’s picture

StatusFileSize
new817 bytes

Here's a patch for HEAD that loads the main send.module file in _send_install_set_default_template() if the send_value() doesn't exist.

damienmckenna’s picture

Some more errors that showed up:

Failed: CREATE TABLE {send_node} ) /*!40100 DEFAULT CHARACTER SET UTF8 */
Failed: CREATE TABLE {send_contact} ) /*!40100 DEFAULT CHARACTER SET UTF8 */
Failed: CREATE TABLE {send_contact_mail} ) /*!40100 DEFAULT CHARACTER SET UTF8 */
Failed: CREATE TABLE {send_recipient} ) /*!40100 DEFAULT CHARACTER SET UTF8 */
Failed: ALTER TABLE {send} ADD `profile` DEFAULT NULL
Failed: UPDATE {send} SET profile = module
ALTER TABLE {send} DROP module
Failed: ALTER TABLE {send} ADD `scid` DEFAULT NULL
Failed: ALTER TABLE {send} ADD `contact_count` DEFAULT NULL
Failed: ALTER TABLE {send_contact} ADD `mail` DEFAULT NULL
Failed: ALTER TABLE {send_contact} ADD `name` DEFAULT NULL
Failed: INSERT INTO {send_contact} (uid, mode, timestamp) SELECT DISTINCT uid, 'mail', MAX(timestamp) FROM {send} WHERE uid != 0 GROUP BY uid
Failed: INSERT INTO {send_contact} (uid, mode, timestamp, mail, name) SELECT DISTINCT 0, 'mail', MAX(timestamp), mail, name FROM {send} WHERE uid = 0 GROUP BY mail, name
Failed: UPDATE {send} s, {send_contact} sc SET s.scid = sc.scid WHERE ( (s.uid = 0 ) AND s.mail = sc.mail) OR ( (s.uid != 0 ) AND s.uid = sc.uid )
ALTER TABLE {send} DROP uid
ALTER TABLE {send} DROP mail
ALTER TABLE {send} DROP name
Failed: INSERT INTO {send_node} SELECT DISTINCT sid, nid FROM {send_recipient_old} WHERE nid != 0
Failed: INSERT INTO {send_contact} (uid, mode, timestamp) SELECT DISTINCT sr.rid, 'mail', MAX(s.timestamp) FROM {send_recipient_old} sr LEFT JOIN {send} s USING (sid) LEFT JOIN {send_contact} sc ON (sr.rid = sc.uid ) WHERE sc.scid IS NULL AND sr.rid != 0 AND sr.rtype = 'user' GROUP BY sr.rid
Failed: INSERT INTO {send_contact} (uid, mode, timestamp, name, mail) SELECT DISTINCT 0, 'mail', MAX(s.timestamp), sr.name, sr.mail FROM {send_recipient_old} sr LEFT JOIN {send} s USING (sid) LEFT JOIN {send_contact} sc ON (sr.rid = sc.uid ) WHERE sc.scid IS NULL AND sr.rid = 0 AND sr.rtype = 'user' GROUP BY sr.mail, sr.name, s.sid
Failed: INSERT INTO {send_contact_mail} (scid, mail, name) SELECT DISTINCT sc.scid, u.mail, u.name FROM {send} s LEFT JOIN {send_contact} sc USING (scid) LEFT JOIN {users} u using (uid) GROUP BY u.uid
Failed: UPDATE {send_contact_mail} scm, {send_contact} sc, {users} u SET scm.mail = u.mail, scm.name = u.name WHERE sc.uid != 0 AND sc.uid = u.uid AND scm.scid = sc.scid
Failed: INSERT INTO {send_contact} (uid, mode, timestamp) SELECT DISTINCT 0, 'mlm', MAX(s.timestamp) FROM {send_recipient_old} sr LEFT JOIN {send} s USING (sid) LEFT JOIN {send_contact} sc ON (sr.rid = sc.uid ) WHERE sc.scid IS NULL AND sr.rid != 0 AND sr.rtype = 'node' GROUP BY sr.rid
Failed: INSERT INTO {send_recipient} (sid, scid, contact_count) SELECT sr.sid, sc.scid, SUM(sr.rcount) FROM {send_recipient_old} sr, {send_contact} sc WHERE sr.rtype = 'user' AND sr.rid != 0 and sr.rid = sc.uid GROUP BY sr.sid, sr.rid, sr.mail
Failed: INSERT INTO {send_recipient} (sid, scid, contact_count) SELECT sr.sid, sc.scid, SUM(sr.rcount) FROM {send_recipient_old} sr, {send_contact} sc WHERE sr.rtype = 'user' AND sr.rid = 0 and sr.mail = sc.mail GROUP BY sr.sid, sr.mail
Failed: INSERT INTO {send_recipient} (sid, scid, contact_count) SELECT sr.sid, sc.scid, SUM(sr.rcount) FROM {send_recipient_old} sr, {send_contact} sc WHERE sr.rtype = 'node' AND sr.rid = 0 and sr.rid = sc.uid GROUP BY sr.sid, sr.rid, sr.mail
Failed: UPDATE {send} s SET contact_count = (SELECT SUM(contact_count) FROM {send_recipient} sr WHERE sr.sid = s.sid)
Failed: INSERT INTO {send_contact_mail} (scid, name, mail) SELECT scid, name, mail FROM send_contact WHERE mode = 'mail'
Failed: ALTER TABLE {send_contact} DROP mail
Failed: ALTER TABLE {send_contact} DROP name
DROP TABLE {send_recipient_old}
Update #6002
Failed: CREATE TABLE {send_template} ) /*!40100 DEFAULT CHARACTER SET UTF8 */
Failed: ALTER TABLE {send} ADD `stid` DEFAULT NULL

Functions send_update_6001() and send_update_6002() both have redundant schema modifications.

damienmckenna’s picture

Status: Needs work » Fixed

A fix was committed by jerdavis which should resolve this:

http://drupal.org/cvs?commit=281990
"Adding a module_exists() check to send.install to prevent potential errors from occuring durring an update operation when the module is not enabled"

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.