Comment votes not working

  • Posts: 114
  • Thank you received: 14
10 years 6 months ago #123009

Just discovered that my comment votes are not working for the comments at the bottom of the product page. When I click on a thumbs up or thumbs down button I get a message saying that... "An error has occurred, please try again later"

I have checked that there are no javascript errors, and also viewed the request and response.

The request is fine...

hikashop_vote_type=useful&value=1&hikashop_vote_id=1&hikashop_vote_user_id=14

As is the request url...
http://fizzfab.com/store/vote/save/tmpl-component

It even appears that the request is working as it gets a 200 response code in return, but when checking the response body instead of sending though the expected response it's sending through the page source for what looks like an empty page...
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns:fb="http://ogp.me/ns/fb#"  xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-gb" lang="en-gb" dir="ltr">
<head>
	  <base href="http://fizzfab.com/store/vote/save/tmpl-component" />
  <meta http-equiv="content-type" content="text/html; charset=utf-8" />
  <meta name="keywords" content="3D printing, 3D models, 3D design, physibles, fabster, maker, thingiverse" />
  <meta name="description" content="FizzFab 3D Printing, Fabster and Maker community. Forums, physibles, models and more." />
  <meta name="generator" content="Joomla! - Open Source Content Management" />
  <title>Store</title>
  <link href="http://fizzfab.com/store/vote/save/tmpl-component" rel="canonical" />
  <link rel="stylesheet" href="/media/com_hikashop/css/frontend_custom.css?v=221" type="text/css" />
  <style type="text/css">
.gkcol { width: 220px; }
  </style>
  <script src="/media/system/js/mootools-core.js" type="text/javascript"></script>
  <script src="/media/system/js/core.js" type="text/javascript"></script>
  <script src="/media/system/js/mootools-more.js" type="text/javascript"></script>
  <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8/jquery.min.js" type="text/javascript"></script>
  <script src="/plugins/system/jqueryeasy/jquerynoconflict.js" type="text/javascript"></script>
  <script src="/media/com_hikashop/js/hikashop.js?v=221" type="text/javascript"></script>
  
  
  <script src="/plugins/system/infinite_scroll/js/jquery.infinitescroll.min.js" type="text/javascript"></script>
  <script type="text/javascript">


                window.InfiniteConfig = {
                    container   : 'body',
                    nextSelector: '.hikashop_next_link',
                    itemSelector: '.hikashop_products',
                    contentSelector: '.hikashop_products_listing_main',
                    navSelector : '.hikashop_products_pagination_bottom',
                    baseURL     : '/localhost',
                    url         : 'http://fizzfab.com/store/vote/save/tmpl-component/?=',
                    limitStart  : 0,
                    limit       : 20,
                    finishedMsg : 'Sorry no more products',
                    msgText     : '<center>Loading...</center>',
                    customComponentName	: ''
                }

				
  </script>
  <script type='text/javascript'>
				/*<![CDATA[*/
					var jax_live_site = 'http://fizzfab.com/index.php';
					var jax_token_var='431ab3a07d5571dd4f79678da1ca6522';
				/*]]>*/
				</script><script type="text/javascript" src="http://fizzfab.com/plugins/system/azrul.system/pc_includes/ajax_1.5.pack.js"></script>

		
		
	<script type="text/javascript" src="http://fizzfab.com/templates/gk_music_free/js/prefixfree.js"></script>
</head>
<body class="contentpane">
			
<div id="system-message-container">
<div id="system-message">
</div>
</div>
		
	</body>
</html>

Not sure why the response is incorrect, I get exactly the same response with URL rewriting off and the .htaccess removed so it would appear that the request is being sent to the correct place.

Any ideas? I've been making quite a few mods to the site so it is likely something that I have done (or undone :D :silly: ) but cannot pinpoint the cause of this.

Let me know if you want to take a look at my store and I will PM you some access details so that you can take a look at the site. Store access is currently not public.

TIA

/DM

Last edit: 10 years 6 months ago by DeeEmm.

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

  • Posts: 2334
  • Thank you received: 403
10 years 6 months ago #123012

Hi there,

First of all you should make sure you have the very last version of Hikashop because we fixed few things on the comment/vote system. If you have a lot of modification done, just replace your the vote related files (in the backend class folder and the front end views).

We would also like an access to your site so we can take a look by ourselves. But if you edited a lot of things it may be ahard for us to find something.

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

  • Posts: 114
  • Thank you received: 14
10 years 6 months ago #123039

Hi Elliot,

I have Hikashop Business version 2.2.1 and HikaMarket Multivendor: 1.3.0

I am running Joomla! 3.1.5 Stable.

I have sent you the access details via PM.

Please let me know if you have any issues with access.

Regards

/DM

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

  • Posts: 114
  • Thank you received: 14
10 years 6 months ago #123063

Not sure if this is any help but I have just noticed that I get the same error message when posting a comment. The comment is posted successfully however.

/DM

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

  • Posts: 25994
  • Thank you received: 4004
  • MODERATOR
10 years 6 months ago #123099

Hi,

For what I know, Nicolas made a patch on the vote & comment system end of last week.
Could you just try to re-download HikaShop 2.2.1, I think it could fix your problem.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 114
  • Thank you received: 14
10 years 6 months ago #123100

Thanks Jerome I will give it a go.

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

  • Posts: 114
  • Thank you received: 14
10 years 6 months ago #123121

It's the same.

Also tested with a standard template. Same there too.

From my testing it appears that the save method is not being called, somehow the component returns before calling it.

I'm stumped.

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

  • Posts: 2334
  • Thank you received: 403
10 years 6 months ago #123189

Hi there,

I actually wonder if it's working or not. Because we had such an issue with the voting system (error message display and page reload) and the vote was actually recorder. Since I am not sure if it's supposed to be visible or not (clicking a thumb), maybe the action is actually well recorder and the issue is just about the error message.

In this case I think it's gonna be easy to fix.

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

  • Posts: 114
  • Thank you received: 14
10 years 6 months ago #123254

Elliot.

It is definitely not working. No vote is recorded. There should be a message saying something like 3 out 5 people found this useful. This message is not displayed, even after refreshing the page. Additionally there is no activity recorded in the backend vote activity. Setting a rating (1-5 stars) and adding comments is working as expected (with the exception of the error message previously mentioned above. )

I can confirm that it is not working as if I add breakpoints within the save() or saveFrontend() methods they never get triggered. I've also eliminated potential issues related to my customisations - i.e. I have tested with a stock template and removed my customisations, the issue still exists.

To boot I just found a comment on your demo site and tested there and the issue is still present.

demo.hikashop.com/index.php?option=com_h...y_pathway=34&lang=en

Please advise.

/DM

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

  • Posts: 25994
  • Thank you received: 4004
  • MODERATOR
10 years 6 months ago #123260

Hi,

Please edit the file "components/com_hikashop/controllers/vote.php" and replace the line

if(!empty($element->comment) || !empty($element->vote) || !empty($element->email_comment) || !empty($element->pseudo_comment))
By
if(!empty($element->comment) || !empty($element->vote) || !empty($element->email_comment) || !empty($element->pseudo_comment) || $element->hikashop_vote_type == 'useful')
It should fix your problem.

Sorry for the inconvenient.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
The following user(s) said Thank You: DeeEmm

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

  • Posts: 114
  • Thank you received: 14
10 years 6 months ago #123288

Thanks Jerome, that worked a treat!

Still getting the error message when posting comments but have managed to 'fix' it... :whistle: :silly:

Doesn't quite make sense but I increased the wait until the page refreshed and it now seems to be okay

setTimeout("document.location=\''.$current_url.'\'",3250);

Have made 30 odd comments with no error whereas before pretty much every second message would display the error message just before the page redirected.

Thanks again!

/DM

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

  • Posts: 25994
  • Thank you received: 4004
  • MODERATOR
10 years 6 months ago #123290

Hi,

We will take a look. I am planning to make some kind of re-factoring of the vote & comment system.
I want to change the javascript in order to no more use Mootools.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 114
  • Thank you received: 14
10 years 6 months ago #123293

Jerome wrote: Hi,
I want to change the javascript in order to no more use Mootools.
Regards,


Yes mootools have been a bit of a PITA for me. The template I decided to use is based on mootools but pretty much everything else uses jquery. Makes for fun coding.

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

  • Posts: 392
  • Thank you received: 0
9 years 10 months ago #157277

Hi,

Has this been fixed? I am having the same problem. The thumbs up or down don't work. I have updated to the latest Hikashop, but still not working.

Thanks :)

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

  • Posts: 13201
  • Thank you received: 2322
9 years 10 months ago #157365

Hi,

Few things have changed about the votes and comments. Could you describe precisely your problem and givue us a link to your website to analyze the requests ?

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

  • Posts: 392
  • Thank you received: 0
9 years 9 months ago #158884

Thanks Xavier,

Her eis the link. When you click on the votes, nothing changes:

Last edit: 9 years 9 months ago by Bugger101.

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

  • Posts: 13201
  • Thank you received: 2322
9 years 9 months ago #158905

Hi,

I just tried on your website and the vote / comment seems to be working like a charm.
Setting a vote and then filling a comment update successfully the vote average and publish the comment.

If you have cache enabled, it can potentially required a page refresh before seeing the comment in the list.

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

  • Posts: 392
  • Thank you received: 0
9 years 9 months ago #159137

Thans Xavier,

The review works, it is the thumbs up/thumbs down vote part that doesn't work.

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

  • Posts: 13201
  • Thank you received: 2322
9 years 9 months ago #159162

Hi,

Sorry, misunderstood. ;)
That doesn't work because the code is broken, as you can see:

on-click="hikashop_vote_useful(37,1);"
Should be:
onclick="hikashop_vote_useful(37,1);"
Without "-".

That's why it is not working as expected, that come potentially from a view override in the view "vote / listing" in Display > Views menu.
This can be caused by the Joomla editor which sometimes add "-" in the HTML attributes.
You can reset the view by clicking on the dustbin in the views list, or edit the view via FTP, the view should be in "templates/YOUR_TEMPLATE/html/com_hikashop/vote".

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

  • Posts: 392
  • Thank you received: 0
9 years 9 months ago #159276

Beautiful, thanks Xavier!

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

Time to create page: 0.127 seconds
Powered by Kunena Forum