Error with EasySocial app if member has no entries

10 months 3 weeks ago #1437
Topic Author
Marc Bills's Avatar
Posts: 14
Error with EasySocial app if member has no entries

Hi again,

When a member has no entries for NorrCompetitions, the app returns an error:
0 Call to a member function getName() on null
This should load a page stating that the member has not yet submitted any entries.

The error is linked to this line in

<?php echo JText::sprintf('APP_USER_NORRCOMPETITION_PROFILE_NO_ITEMS', $user->getName()); ?>

I resolved it like this, but I'm sure you guys will have a more elegant way to fix it:
<?php } else { ?>
		<div class="empty">
			<?php
		                        $id = JRequest::getInt( 'id' , null );
					$user = ES::user($id); // current user profile id
                                        echo JText::sprintf('APP_USER_NORRCOMPETITION_PROFILE_NO_ITEMS', $user->getName()); ?>
		</div>
		<?php } ?>

The topic has been locked.
10 months 3 weeks ago #1438
Dmitry's Avatar
Posts: 532
Error with EasySocial app if member has no entries

It's a bug :(

This line is missing in /view/profile/view.html.php:

$this->set('user', $user);

Please re-download again - have fixed it :)


Like our extensions and support?
Add your voice to the JED listing with a 100-score review: bit.ly/2ciJBqC
Thanks!
The topic has been locked.

You can get our help: Monday - Friday / 09:00 to 17:00 (GMT+2). but not limited. Our staff will be pleased to provide Premium support to every paid subscriber asap, but sometimes you should be ready to wait for our reply for up to 3 days. In case of free extensions we do the best to develop and maintain them either, but their support is not necessary.

Product Latest Update