Vote error

2 weeks 5 days ago #2267
Topic Author
Balam Ak Ab's Avatar
Posts: 25
Vote error

Hi
When I try to vote, or any who wants to vote in my site have error and the the vote is not register, I leave the error message from administrator/logs/com_competition.php if helps:

#
#<?php die('Forbidden.'); ?>
#Date: 2019-07-02 03:37:18 UTC
#Software: Joomla Platform 13.1.0 Stable [ Curiosity ] 24-Apr-2013 00:00 GMT

#Fields: datetime priority clientip category message
2019-07-02T03:37:18+00:00 ERROR xxx.xxx.xx.164 com_competition Unknown column 'random' in 'order clause'


> #0 /public_html/libraries/joomla/database/driver.php(1695): JDatabaseDriverMysqli->execute()
#1 /public_html/components/com_competition/models/participant.php(765): JDatabaseDriver->loadObjectList('id')
#2 /public_html/components/com_competition/models/participant.php(160): CompetitionModelParticipant->setPreviousNextItem(Object(stdClass))
#3 /public_html/components/com_competition/controller.php(323): CompetitionModelParticipant->getItem(1)
#4 /public_html/components/com_competition/controller.php(196): CompetitionController->processParticipant(Object(CompetitionModelParticipant))
#5 /public_html/libraries/src/MVC/Controller/BaseController.php(710): CompetitionController->display()
#6 /public_html/components/com_competition/competition.php(48): Joomla\CMS\MVC\Controller\BaseController->execute('')
#7/public_html/libraries/src/Component/ComponentHelper.php(402): require_once('/home/ad...')
#8 /public_html/libraries/src/Component/ComponentHelper.php(377): Joomla\CMS\Component\ComponentHelper::executeComponent('/home/ad...')
#9 /public_html/libraries/src/Application/SiteApplication.php(194): Joomla\CMS\Component\ComponentHelper::renderComponent('com_competition')
#10 /public_html/libraries/src/Application/SiteApplication.php(233): Joomla\CMS\Application\SiteApplication->dispatch()
#11 /public_html/libraries/src/Application/CMSApplication.php(196): Joomla\CMS\Application\SiteApplication->doExecute()
#12 /public_html/index.php(49): Joomla\CMS\Application\CMSApplication->execute()

In this vote I use the competiotion Grid module.

I hope you can help, I think maybe I need to install something in the server. Because I need to install some things in apache server to make the joomla extensions works fine, but I search here in this and I dont found nothing, Have a good day.

Attachments:
Last edit: 2 weeks 5 days ago by Balam Ak Ab.

2 weeks 4 days ago #2268
Dmitry's Avatar
Posts: 640
Vote error

Hi.

This is a bug in component code that will be fixed in the next version.
To fix it manually open file /components/com_competition/models/participant.php and around line 730 find this code:

$this->setState(
	'list.ordering',
	$app->getUserState(
		$this->option . '.competition.' . $item->competition_id . '.filter.ordering',
		$item->params->get('participants_default_order', 'votes')
	)
);

Change it to this code:
$ordering = $app->getUserState(
	$this->option . '.competition.' . $item->competition_id . '.filter.ordering',
	$item->params->get('participants_default_order', 'votes')
);

if ($ordering == 'random')
{
	$ordering = $item->params->get('participants_default_order', 'votes');
}

$this->setState('list.ordering', $ordering);

Best regards,
Dmitry


Like our extensions and support?
Add your voice to the JED listing with a 5-score review: bit.ly/2ciJBqC
Thanks!
Last edit: 2 weeks 4 days ago by Dmitry.

2 weeks 4 days ago #2269
Topic Author
Balam Ak Ab's Avatar
Posts: 25
Vote error

Hi again and thanks for your answer, I do the changes but nothing, I have the same error. I check the log and have the same log report:

2019-07-02T16:23:14+00:00 ERROR xxx.xxx.xx.164 com_competition Unknown column 'random' in 'order clause'


> #0 /public_html/libraries/joomla/database/driver.php(1695): JDatabaseDriverMysqli->execute()
#1 /public_html/components/com_competition/models/participant.php(769): JDatabaseDriver->loadObjectList('id')
#2 /public_html/components/com_competition/models/participant.php(160): CompetitionModelParticipant->setPreviousNextItem(Object(stdClass))
#3 /public_html/components/com_competition/controllers/participant.json.php(90): CompetitionModelParticipant->getItem(1, false)
#4 /public_html/libraries/src/MVC/Controller/BaseController.php(710): CompetitionControllerParticipant->ajaxVote()
#5 /public_html/components/com_competition/competition.php(48): Joomla\CMS\MVC\Controller\BaseController->execute('ajaxvote')
#6 /public_html/libraries/src/Component/ComponentHelper.php(402): require_once('/home/ad...')
#7 /public_html/libraries/src/Component/ComponentHelper.php(377): Joomla\CMS\Component\ComponentHelper::executeComponent('/home/ad...')
#8 /public_html/libraries/src/Application/SiteApplication.php(194): Joomla\CMS\Component\ComponentHelper::renderComponent('com_competition')
#9 /public_html/libraries/src/Application/SiteApplication.php(233): Joomla\CMS\Application\SiteApplication->dispatch()
#10 /public_html/libraries/src/Application/CMSApplication.php(196): Joomla\CMS\Application\SiteApplication->doExecute()
#11 /public_html/index.php(49): Joomla\CMS\Application\CMSApplication->execute()
#12 {main}

Attachments:

2 weeks 3 days ago #2272
Dmitry's Avatar
Posts: 640
Vote error

Well :) Just looked in code of upcoming 1.8.0 and there were several places where I have fixed it :side: It becomes slightly complicated, but if you want a quick fix - turn of random ordering of participants in contest options and it should help. If you need this random ordering then leave a note - I will try to provide step by step changes in files :pinch:


Like our extensions and support?
Add your voice to the JED listing with a 5-score review: bit.ly/2ciJBqC
Thanks!

2 weeks 3 days ago #2273
Topic Author
Balam Ak Ab's Avatar
Posts: 25
Vote error

Hi again, are you sure the random ordering is this makes the error, because I disable the random ordering in the competition grid and I still have the same error, this not fixit. Thanks for your time.

2 weeks 3 days ago #2274
Dmitry's Avatar
Posts: 640
Vote error

I mean component options, not module options.


Like our extensions and support?
Add your voice to the JED listing with a 5-score review: bit.ly/2ciJBqC
Thanks!

2 weeks 2 days ago #2275
Topic Author
Balam Ak Ab's Avatar
Posts: 25
Vote error

Thanks your right I have the randow ordering in the main extension, I dont see this, now I can vote. Thanks again.

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