Author Topic: BOM added in cart module in category view [SOLVED]  (Read 466 times)

Cococoder

  • Beginner
  • *
  • Posts: 41
  • A beginner
BOM added in cart module in category view [SOLVED]
« on: August 16, 2019, 10:05:23 am »
Hi guys,
PHP Version   7.3.8
Joomla! 3.9.11 Stable
VirtueMart 3.4.2
Template Vmbeez3

As stated in the subject, BOM is added to the cart module and shift the module content down.
Same issue with Horme3 but only when an item is added to the cart.
I checked with notepad++ that the files involved were correctly encoded in UTF-8 and not with UTF-8 DOM.  First suspects were index.php and mod_virtuemart_cart/default.php but they come out clear so no luck with that. Furthermore that doesn't add up with the fact issue is only in category view and home page.

I cleared the browser cache and joomla cache, tried different browsers but issue persists.

I'd be glad if you guys could check if you have this BOM marker in your code. it is invisible but can shif content down and is displayed as red dot in firefox developper console.  In google developper console it shows as "
                     "

I suspect the issue comes from the ajax script updating the content of the module but couldn't locate it so far.

Community help is greatly appreciated.


Studio 42

  • Contributing Developer
  • Sr. Member
  • *
  • Posts: 4023
  • Joomla & Virtuemart developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3
Re: BOM added in cart module in category view
« Reply #1 on: August 16, 2019, 11:15:46 am »
Your code seems to be not the core module. If not, check with the dev of this module.

Cococoder

  • Beginner
  • *
  • Posts: 41
  • A beginner
Re: BOM added in cart module in category view
« Reply #2 on: August 16, 2019, 12:13:47 pm »
Hi Studio 42,

Thanks for having a look at my post. I am using VirtueMart Shopping Cart by The VirtueMart Development Team.  I am using Vmbeez3  without any override.

I am currently checking files for BOM on my servers but did not find anything convincing so far.

Cococoder

  • Beginner
  • *
  • Posts: 41
  • A beginner
Re: BOM added in cart module in category view
« Reply #3 on: August 16, 2019, 12:25:04 pm »
Well unsurprisingly, this was a third party payment plugin that interfere with the rendering of the otherwise core cart module.
I SSH into the shared hosting, found the file using this code:
find -type f|while read file;do [ "`head -c3 -- "$file"`" == $'\xef\xbb\xbf' ] && echo "found BOM in: $file";done
Encoded it in UTF-8 with notepad++
and uploaded back to the server.

Thanks again for stopping by Studio 42

AH

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 2988
  • VirtueMart Version: 3.6.3
Re: BOM added in cart module in category view [SOLVED]
« Reply #4 on: August 16, 2019, 12:53:04 pm »
Thanks for the update - glad you found it

Any chance you can let others know the plugin name?
regards
A

Joomla 3.9.12
php 7.2

Cococoder

  • Beginner
  • *
  • Posts: 41
  • A beginner
Re: BOM added in cart module in category view [SOLVED]
« Reply #5 on: August 16, 2019, 14:33:11 pm »
That's a localized payment plugin for a small language group. Not maintained anymore. Not sure it is very useful. Plus I had to modify it to add more payment method so I might have introduced the error at some point.
For all these reasons, I thought it more important to focus on the method rather than the specific plugin or files.