Keyword

Cannot vote within category item details and item details

More
6 years 6 months ago #164182 by mx5gr
We are using the latest K2 version under Joomla 3.8.0.

When we click on the rating/voting stars either on the item details page or on the category item details one, the AJAX call is made to a non-valid url of the form:

www.mycompany.com/el/undefinedindex.php?option=com_k2&view=item&task=vote&format=raw&user_rating=4&itemID=590

If the correct AJAX call is made, that is:

www.mycompany.com/index.php?option=com_k2&view=item&task=vote&format=raw&user_rating=4&itemID=590

then the system counts the vote and returns a valid text ("Ευχαριστούμε για την βαθμολογία!").

How can this erroneous URL AJAX call can be fixed?

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
6 years 6 months ago #164203 by Krikor Boghossian
Replied by Krikor Boghossian on topic Cannot vote within category item details and item details
Hello there,

Is there a link to your site available?

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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

More
6 years 6 months ago #164255 by mx5gr
Sure.. where can I PM you one?

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
6 years 6 months ago #164267 by Krikor Boghossian
Replied by Krikor Boghossian on topic Cannot vote within category item details and item details
You can paste the link here.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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

More
6 years 6 months ago #164319 by mx5gr

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
6 years 6 months ago #164358 by Krikor Boghossian
Replied by Krikor Boghossian on topic Cannot vote within category item details and item details
Are you using SH404SEF?
Is it up to date?

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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

More
6 years 6 months ago #164520 by mx5gr
Sorry for the late reply..

Yes, we are using the latest sh404sef 4.11. The SEO settings for K2 are set to use Joomla router for SEO.

Issue still persists :(

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
6 years 6 months ago #164535 by Krikor Boghossian
Replied by Krikor Boghossian on topic Cannot vote within category item details and item details
This is not the default behaviour as you might have imagined.
Flush all links if you changed any settings in SH404.
If that doesn't do the trick you can correct this here: github.com/getk2/k2/blob/master/media/k2/assets/js/k2.frontend.js#L183

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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

More
6 years 6 months ago #164543 by mx5gr
Actually, the issue lies some lines before the one you mentioned, i.e.:
var K2SitePath = getUrlParams('k2.frontend.js', 'sitepath');

The function getUrlParams reads for all the script declarations on the page and tries to find k2.frontend.js among the ones loaded on the page.
As we employ page compression, k2.frontend.js is not loaded through a script declaration since it is part of a compressed file with another filename.
Therefore, K2SitePath variable is never set and the value returned is always "undefined".

I performed a quick fix by:
var K2SitePath = "/";

I believe however that an alternative way of determining the value should be sought out..

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
6 years 6 months ago #164557 by Krikor Boghossian
Replied by Krikor Boghossian on topic Cannot vote within category item details and item details
Kudos,

Yes maybe a check if the value is undefined and manually adding a slash might have a point.

Thank you for your feedback.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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


Powered by Kunena Forum