Rogue Quotation Mark

  • Posts: 56
  • Thank you received: 1
9 years 3 months ago #243222

-- url of the page with the problem -- : www.swiftplantspares.com/jcb-parts/part/...x-assembly-460-92850
-- HikaShop version -- : 2.6.3
-- Joomla version -- : 3.2.7

Hi -

I have a very strange problem on product pages. A quotation mark is being added before a <table> on the product page. I can not find where it is coming from! It's not even in the source code when I view source, yet is still there if I disable JS and CSS!

The page is at:
www.swiftplantspares.com/jcb-parts/part/...x-assembly-460-92850

The quote is on the right, just above the product info table.

Any suggestions would be much appreciated! I have added a comment in the overridden product_block_dimensions template right before the opening <table> so it is not from the template. And anyway then it would be in the source code!

Here is the line from the overridden template:

echo "<!-- Testing the rogue quote! --><table class=\"product_info\">";

And it gets inserted in there, just before the <table.

Confused!

Thanks
Nigel


Professional website services including website management, Linux server admin and web hosting.
www.sharphosting.uk/
Last edit: 9 years 3 months ago by NigelPeck.

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

  • Posts: 56
  • Thank you received: 1
9 years 3 months ago #243225

Sorry this should have been in Category and Product display. I always forget the new topic button doesn't remember the category! Sorry. Could a moderator please move it?


Professional website services including website management, Linux server admin and web hosting.
www.sharphosting.uk/
Last edit: 9 years 3 months ago by NigelPeck.

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

  • Posts: 2143
  • Thank you received: 747
9 years 3 months ago #243226

Hi,

This is what I'm getting in Safari when following your link:




It's similar warnings in other browsers. Must not be true or as dramatic, but I'll heed the warning and stay away, anyway. Maybe you want to do some other checks first ;)


Need help with customisations of layouts, style or other site development? PM me!
(Don't forget to turn on "E-mail notification of new messages" )
Attachments:

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

  • Posts: 56
  • Thank you received: 1
9 years 3 months ago #243227

Sure. Sensible to stay away! This issue was resolved this morning but the warning is in review (it's gone for me - thought same for all). I will update here once Google's review is complete. Thanks.


Professional website services including website management, Linux server admin and web hosting.
www.sharphosting.uk/
Last edit: 9 years 3 months ago by NigelPeck.

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

  • Posts: 56
  • Thank you received: 1
9 years 3 months ago #243241

I just got the email from Google saying the review is complete, so that message should be gone for you now. Would be interested to know if it has, if you wouldn't mind letting me know. Thanks.


Professional website services including website management, Linux server admin and web hosting.
www.sharphosting.uk/

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

  • Posts: 2143
  • Thank you received: 747
9 years 3 months ago #243244

Yup, no more warning.

The quotation mark might be coming from a customization, probably in the view "product / show_block_custom_main".

You may also check the page with the W3 Markup Validator: validator.w3.org/nu/?doc=http%3A%2F%2Fww...x-assembly-460-92850
It gives you a "fatal error" from this or yet another quotation mark.

You have JS errors on that page, too.

So, a few thorough reviews and checks are in order. However, nothing coming from HikaShop.


Need help with customisations of layouts, style or other site development? PM me!
(Don't forget to turn on "E-mail notification of new messages" )
Last edit: 9 years 3 months ago by lousyfool.
The following user(s) said Thank You: NigelPeck

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

  • Posts: 84313
  • Thank you received: 13702
  • MODERATOR
9 years 3 months ago #243230

Hi,

That's something that is added either by your template or that was added by the person who customized the product page layout.
It's not like that by default.
So hard to say where it comes from.
I would guess that it has been added to the show_default view file. That's where I would look first.

The following user(s) said Thank You: NigelPeck

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

  • Posts: 56
  • Thank you received: 1
9 years 3 months ago #243302

Hi nicolas,

Thanks for this. I agree, it is hard to say where it might be coming from. I'm really looking just for help more than anything else, or some pointers. The first place I looked was show_default, and then moved on to my customised (by me) show_block_dimensions. That is where the table is that the quotation mark is appearing before.

But what I perhaps didn't make clear in my original post, is that I added a comment just before the start of that table in the templates, in the same string that is echo'd, and the quotation mark STILL gets inserted between the table and the comment.

Here is the code snippet with some surrounding code:

<?php echo JText::_('PRODUCT_HEIGHT').': '.rtrim(rtrim($this->element->product_height,'0'),',.').' '.JText::_($this->element->product_dimension_unit); ?><br />
	</span>
<?php
}

echo "<!-- Testing the rogue quote! --><table class=\"product_info\">";

if($this->config->get('manufacturer_display', 0) && !empty($this->element->product_manufacturer_id)){
	$class = hikashop_get('class.category');
	$manufacturer = $class->get($this->element->product_manufacturer_id);

The quote gets inserted between those two angle brackets!

If it was just a quote hanging around in a template, I would not be posting here. But this is getting inserted in a very strange way that I have no clue on! It is still there with JS and CSS switched off, but yet is definitely not in the template file. What could possibly be parsing that and adding a quotation mark? Very strange.


Professional website services including website management, Linux server admin and web hosting.
www.sharphosting.uk/
Last edit: 9 years 3 months ago by NigelPeck.

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

  • Posts: 84313
  • Thank you received: 13702
  • MODERATOR
9 years 3 months ago #243332

Hi,

So several things to try:
- if you remove that whole line of code, do you still have the rogue quote ?
If no, then it's highly likely that it's added by a system plugin parsing the page so you can try disabling them one by one.
If yes, then, are you sure that you're editing the correct view file ? Do you still have the comment tag in the input ?

- If you switch the template to protostar, do you still have the problem if you add that custom line of code ? If yes, then the problem is definitely not with the template but a plugin. If no, then the problem might be in the template, or a view file. In that case, you could rename the view files in the templates/YOUR_TEMPLATE/html/com_hikashop/product folder one by one and see if one of them solves the issue.

The following user(s) said Thank You: NigelPeck

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

  • Posts: 56
  • Thank you received: 1
9 years 3 months ago #243408

That's great Nicolas, thank you. I will be having a look at this soon.


Professional website services including website management, Linux server admin and web hosting.
www.sharphosting.uk/

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

  • Posts: 56
  • Thank you received: 1
9 years 2 months ago #243633

I managed to track down the culprit! It was in fact a rogue quotation mark in that template file. It was actually on a table row towards the end of the table, and the Firefox document inspector was moving it to just before the opening <table> tag, because of it being invalid just before a "<tr>". So that is why it was still there with CSS and JS off, yet not visible in the source code (or at least not visible where it was showing on the page). I have learned something!

Thanks for the help! Much appreciated and this thread is a good reference for future HikaShop debugging!


Professional website services including website management, Linux server admin and web hosting.
www.sharphosting.uk/
Last edit: 9 years 2 months ago by NigelPeck.

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

Time to create page: 0.086 seconds
Powered by Kunena Forum