Subscriber name not appearing in admin section

More
14 May 2011 20:40 #1168 by OpenEyeMedia
joomlamailer version:1.7
Joomla! version:1.6 /1.5.23
PHP version:5.2.16
MySQL version: 5.0.91

Hi there,
I've been testing my Joomlamailer installation, and for some reason the subscriber's name (first and last), is not appearing in the admin section of Joomlamailer. The details appear in MailChimp ok, but just not in Joomla.

I have tried it on two different sites - one using Joomla 1.5 and the other 1.6, and I have the same issue. If I add a subscriber via MailChimp, the issue remains.

Any advice on how to resolve this would be greatly appreciated. I'm sure there is something I am overlooking, or there is an issue with server settings that I'm unaware of, and being pointed in the right direction would be fantastic.

Thanks in advance for your help.
Chris

Please Log in or Create an account to join the conversation.

More
14 May 2011 20:48 #1169 by pete
Hello Chris,

The names only appear if the user (with the given email address) is registered on the Joomla site.

Kind regards,
Pete

Please Log in or Create an account to join the conversation.

More
14 May 2011 21:04 #1170 by OpenEyeMedia
Hi there,
Thank-you for the speedy response, and for clarifying what the 'issue' was.
One of the sites I'm working on has CB installed, and so has a login form, and testing it, it all works fine. However the other will have no need for a login form. Adding users via Joomla admin does as it should - shows the name within Joomlamailer, but when you click on the subscriber's name, it comes up with the following:

Fatal error: Call to a member function getUserStateFromRequest() on a non-object in /home/BLAH/public_html/BLAH/administrator/components/com_joomailermailchimpintegration/models/subscriber.php on line 35

I notice that when registering a user via Joomla admin there is only a 'name' field, and not a 'first name' and 'last name' field - is that possibly the cause of the issue, as Joomlamailer needs 2 entries (at least is you retain the default set up of two name separate name fields)?

Thanks again,
Chris

Please Log in or Create an account to join the conversation.

More
14 May 2011 21:15 #1171 by pete
That fatal error is a bug and will be fixed in the next version. Thanks for finding it :D
If you want to fix it yourself you need to edit the file /administrator/components/com_joomailermailchimpintegration/models/subscriber.php

At line 32 you'll find: "global $mainframe, $option;" Replace that line with:

$mainframe =& JFactory::getApplication();
$option = JRequest::getCmd('option');

To clarify things: what joomlamailer does is it looks in the joomla database if it finds an entry with the given email address (from the MailChimp list). If it finds an entry it will display the name, otherwise the name is left blank.
It doesn't matter how you add the user to Joomla as long as the email address is one of the subscribers in your MailChimp list.

Kind regards,
Pete

Please Log in or Create an account to join the conversation.

More
14 May 2011 21:43 #1172 by OpenEyeMedia
Happy to be of service! :)
Thanks for info on how to sort it out, and for clarifying how things are handled.
Take care, and have a great weekend.
Chris

Please Log in or Create an account to join the conversation.

More
14 May 2011 21:53 #1173 by OpenEyeMedia
Hi there,
Sorry, just to let you know the fix worked to a degree - it allows me access to the profile, which is great - thank you! but it also throws up the following errors:

Warning: Invalid argument supplied for foreach() in /home/BLAH/public_html/BLAH/administrator/components/com_joomailermailchimpintegration/models/subscriber.php on line 138

Warning: Invalid argument supplied for foreach() in /home/BLAH/public_html/BLAH/administrator/components/com_joomailermailchimpintegration/views/subscriber/view.html.php on line 63

Warning: Invalid argument supplied for foreach() in /home/BLAH/public_html/BLAH/administrator/components/com_joomailermailchimpintegration/views/subscriber/view.html.php on line 79

Warning: Invalid argument supplied for foreach() in /home/BLAH/public_html/BLAH/administrator/components/com_joomailermailchimpintegration/views/subscriber/tmpl/default.php on line 25

I won't be going live with the site for a few weeks yet, so please don't be going out of your way for my sake - I'm happy to wait for the next release if need be.

Thanks again for all your help.
Kind regards,
Chris

Please Log in or Create an account to join the conversation.

More
14 May 2011 22:13 #1174 by pete
Yet another one. Doh!

Replace the function MC_object (line 116 to 123) in the file /administrator/components/com_joomailermailchimpintegration/models/subscriber.php with:
Code:
function MC_object() { $params =& JComponentHelper::getParams( 'com_joomailermailchimpintegration' ); $paramsPrefix = (version_compare(JVERSION,'1.6.0','ge')) ? 'params.' : ''; $MCapi = $params->get( $paramsPrefix.'MCapi' ); $MC = new joomailerMCAPI($MCapi); return $MC; }

While you're at it: replace "mc_object" with "MC_object" ( line 269 and 279).

Kind regards,
Pete

Please Log in or Create an account to join the conversation.

More
16 May 2011 22:10 #1178 by OpenEyeMedia
Hi there,
Apologies for the delay in replying. I've applied the fixes, and everything now appears as it should.
Thanks for all you help in sorting this out, and doing so so quickly.
Take care,
Chris

Please Log in or Create an account to join the conversation.