Errors EO PRODUCT VOTE

  • Posts: 222
  • Thank you received: 1
9 years 9 months ago #189724

-- HikaShop version -- : 2.3.5
-- Joomla version -- : 3.3.6

W3C Markup Validation Service shows 16 errors:

Line 688, column 34: Element div not allowed as child of element span in this context. (Suppressing further errors from this subtree.)
<!-- EO PRODUCT VOTE -->
Line 751, column 34: Element div not allowed as child of element span in this context. (Suppressing further errors from this subtree.)
<!-- EO PRODUCT VOTE -->
Line 814, column 34: Element div not allowed as child of element span in this context. (Suppressing further errors from this subtree.)
<!-- EO PRODUCT VOTE -->
Line 862, column 23: & did not start a character reference. (& probably should have been escaped as &.)
</span>
Line 878, column 34: Element div not allowed as child of element span in this context. (Suppressing further errors from this subtree.)
<!-- EO PRODUCT VOTE -->
Line 941, column 34: Element div not allowed as child of element span in this context. (Suppressing further errors from this subtree.)
<!-- EO PRODUCT VOTE -->
Line 1004, column 34: Element div not allowed as child of element span in this context. (Suppressing further errors from this subtree.)
<!-- EO PRODUCT VOTE -->
Line 1068, column 34: Element div not allowed as child of element span in this context. (Suppressing further errors from this subtree.)
<!-- EO PRODUCT VOTE -->
Line 1131, column 34: Element div not allowed as child of element span in this context. (Suppressing further errors from this subtree.)
<!-- EO PRODUCT VOTE -->
Line 1194, column 34: Element div not allowed as child of element span in this context. (Suppressing further errors from this subtree.)
<!-- EO PRODUCT VOTE -->
Line 1258, column 34: Element div not allowed as child of element span in this context. (Suppressing further errors from this subtree.)
<!-- EO PRODUCT VOTE -->
Line 1321, column 34: Element div not allowed as child of element span in this context. (Suppressing further errors from this subtree.)
<!-- EO PRODUCT VOTE -->
Line 1384, column 34: Element div not allowed as child of element span in this context. (Suppressing further errors from this subtree.)
<!-- EO PRODUCT VOTE -->
Line 1448, column 34: Element div not allowed as child of element span in this context. (Suppressing further errors from this subtree.)
<!-- EO PRODUCT VOTE -->
Line 1511, column 34: Element div not allowed as child of element span in this context. (Suppressing further errors from this subtree.)
<!-- EO PRODUCT VOTE -->
Line 1574, column 34: Element div not allowed as child of element span in this context. (Suppressing further errors from this subtree.)
<!-- EO PRODUCT VOTE -->

and that is code on page view-source:

<!-- PRODUCT VOTE -->
<span class="hikashop_product_vote">
	<input 	type="hidden" id="hikashop_vote_ok_115" value="0"/>
	<input 	type="hidden" id="vote_type_115" value="product"/>
	<input 	type="hidden" id="hikashop_vote_user_id_115" value=""/>

	<div class="hikashop_vote_stars">
		<input type="hidden" name="hikashop_vote_rating" data-type="product" data-max="5" data-ref="115" data-rate="0" id="select_id_115_hikashop_category_information_menu_106" />
		<span class="hikashop_total_vote" >(<span class="hasTooltip" title="&lt;strong&gt;Gemiddeld&lt;/strong&gt;&lt;br /&gt;0/5"> 0 </span>) </span>
		<span id="hikashop_vote_status_115" class="hikashop_vote_notification_mini"></span>
	</div>
</span>
<!-- EO PRODUCT VOTE -->

I found info that div can not be inside span. Above you can see that div is inside span. How to fix that?

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
9 years 9 months ago #189732

Hi,

You can change the div into a span.

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: 222
  • Thank you received: 1
9 years 9 months ago #189774

Thanks, Jerome

I know that it has to be changed. I am not programmer and I am afraid to make mistake. Can you tell me where I have to make those changes and div to change to ... (span, id or others)?

Please, help me
Vero

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

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

Hi,

Please use that code:

<!-- PRODUCT VOTE -->
<span class="hikashop_product_vote">
	<input 	type="hidden" id="hikashop_vote_ok_115" value="0"/>
	<input 	type="hidden" id="vote_type_115" value="product"/>
	<input 	type="hidden" id="hikashop_vote_user_id_115" value=""/>

	<span class="hikashop_vote_stars">
		<input type="hidden" name="hikashop_vote_rating" data-type="product" data-max="5" data-ref="115" data-rate="0" id="select_id_115_hikashop_category_information_menu_106" />
		<span class="hikashop_total_vote" >(<span class="hasTooltip" title="&lt;strong&gt;Gemiddeld&lt;/strong&gt;&lt;br /&gt;0/5"> 0 </span>) </span>
		<span id="hikashop_vote_status_115" class="hikashop_vote_notification_mini"></span>
	</span>
</span>
<!-- EO PRODUCT VOTE -->
it will maybe requrie some css properties to have the same display than previously.

Last edit: 9 years 9 months ago by nicolas. Reason: correct code

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

  • Posts: 222
  • Thank you received: 1
9 years 9 months ago #189867

Sorry, Xavier,
but I don't understand. Your code is the same code used now on my page. And with the same problem: div inside the span. (W3C Markup Validation Service shows errors)

And I don't understand, where I have to add this code?

Regards,
Vero

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

  • Posts: 82867
  • Thank you received: 13374
  • MODERATOR
9 years 9 months ago #189895

Hi,

I corrected the code Xavier put in his message. Please change the code in the view file to use the code posted by Xavier and then modified by myself and it should be better.

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

  • Posts: 222
  • Thank you received: 1
9 years 9 months ago #189934

Sorry, but there are more view files. I'll try one more time to ask: where I have to change this code? Which view file?

This?

<?php
/**
 * @package	HikaShop for Joomla!
 * @version	2.3.5
 * @author	hikashop.com
 * @copyright	(C) 2010-2015 HIKARI SOFTWARE. All rights reserved.
 * @license	GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */
defined('_JEXEC') or die('Restricted access');
?><span class="hikashop_product_vote">
<?php
	$js = '';
	$this->params->set('vote_type','product');
	$this->params->set('product_id',$this->row->product_id);
	$this->params->set('main_div_name',$this->params->get('main_div_name'));
	$this->params->set('listing_product', true);
	echo hikashop_getLayout('vote', 'mini', $this->params, $js);
?>
</span>

This is product/listing_vote.php file. One more sorry, but I don't understant what I have to change in above code.

Regards,
Vero

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
9 years 9 months ago #189935

Hi,

The required override is for the view "vote | mini".
You will find this part of code

	<div class="hikashop_vote_stars">
		<input type="hidden" name="hikashop_vote_rating" data-type="<?php echo $type_item; ?>" data-max="<?php echo $hikashop_vote_nb_star; ?>" data-ref="<?php echo $hikashop_vote_ref_id;?>" data-rate="<?php echo $hikashop_vote_average_score_rounded; ?>" id="<?php echo $select_id;?>" />
		<span class="hikashop_total_vote" >(<?php echo JHTML::tooltip($hikashop_vote_average_score.'/'.$hikashop_vote_nb_star, JText::_('VOTE_AVERAGE'), '', ' '.$hikashop_vote_total_vote.' '); ?>) </span>
		<span id="hikashop_vote_status_<?php echo $hikashop_vote_ref_id;?>" class="hikashop_vote_notification_mini"></span>
	</div>
You need to change the "div" into a "span" in the first line and the last line of the code I pasted.

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: 222
  • Thank you received: 1
9 years 9 months ago #189971

Many Thanks, I found it.

Vero

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

Time to create page: 0.081 seconds
Powered by Kunena Forum