News:

Support the VirtueMart project and become a member

Main Menu

BOM added in cart module in category view [SOLVED]

Started by Cococoder, August 16, 2019, 10:05:23 AM

Previous topic - Next topic

Cococoder

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

Your code seems to be not the core module. If not, check with the dev of this module.

Cococoder

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

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

Thanks for the update - glad you found it

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

Joomla 3.10.11
php 8.0

Cococoder

#5
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.