Author Topic: vmMainPage - ShopIndex Layout Issue  (Read 14686 times)

simonwellsuk

  • Beginner
  • *
  • Posts: 15
vmMainPage - ShopIndex Layout Issue
« on: December 13, 2009, 11:13:36 am »
The Issue
There is a large gap between my Main Store Page title and the content above it, kind of like margin-top is set to a large value, which it isn't
See what I mean here:http://theledlightingcompany.co.uk/images/vmstore-error.jpg

Research
There was another thread from last reporting the same problem, but there were no replies, so I publish this thread to gain some advise, but to hopefully provide a solution too. It might also be useful to others as I record the files that I find that are associated to this.

I checked Firebug and View Source which shows that the following code is used:
Code: [Select]
<div id="vmMainPage"><br/><br/>
<p><br mce_bogus="1"/></p>

If I set the Display Title to NO in the module that the store front uses, then the gap remains and just the H3 is dropped. See image: http://theledlightingcompany.co.uk/images/vmstore-errornoH3.jpg

vmMainPage is called from the shop.index.php found in public_html/administrator/components/com_virtuemart/html/shop.index.php
Which states:
Code: [Select]
echo $tpl->fetch( 'common/shopIndex.tpl.php');
shopIndex.tpl.php is found in public_html/components/com_virtuemart/themes/YOURTHEMENAME/templates/common/shopIndex.tpl.php
In my copy, it states:
Code: [Select]
echo ($vendor_store_desc) ? $vendor_store_desc."<br /><br />" : "";
To me the addition of the extra breaks are worthless, unless someone can explain why.  I also checked the default theme and that had something similar:
Code: [Select]
echo $vendor_store_desc."<br />";
So I went and stripped out the breaks and wrapped () around some code which resulted in:
Code: [Select]
echo ($vendor_store_desc);This then shifted everything up the page, See Image: http://theledlightingcompany.co.uk/images/vmstore-errornoH3nobr.jpg

The Question
So this leaves me wondering what the heck
Code: [Select]
<br mce_bogus="1"/> is and how to get rid of it.
Well, I am viewing the page as a visitor with no editor access, so it cant be that.
Although I have Editor-TinyMCE 2.0 installed, it is disabled as I use JCE.
Even when I log in to the site as Super Admin, the gap/code still appears.

More Research
A quick search for "mce_bogus" pointed me to the 1st article: http://tinymce.moxiecode.com/punbb/viewtopic.php?pid=51333
This kind of confirms it is a TinyMCE issue, but I don't use it as I double check, JCE 1.5.6 is my default editor in Global Configuration.
So I thought, lets just uninstall MCE, you can't!! Although TinyMCE2.0 is disabled in my Plugins, when i goto Install/Uninstall there is no V2.0, but V3.

A Dangerous Test?
Throwing complete caution to the wind, I thought I would try manually removing MCE.
I made a "backup" created a backup folder and then placed the tinymce.php, tinymce.xml and tinymce folder found in /public_html/plugins/editors.
This made no difference . . . . :-\ it was still shown in the plugins.

Time for coffee . . . . . . .

rb

  • Advanced
  • Full Member
  • *****
  • Posts: 1503
Re: vmMainPage - ShopIndex Layout Issue
« Reply #1 on: December 13, 2009, 15:50:26 pm »
Perhaps your Template is putting in the extra elements.

simonwellsuk

  • Beginner
  • *
  • Posts: 15
Re: vmMainPage - ShopIndex Layout Issue
« Reply #2 on: December 13, 2009, 18:00:22 pm »
rb, thanks.

Afraid not, I change to the default VM theme and
Code: [Select]
<p><br mce_bogus="1"/></p> is still there.

rb

  • Advanced
  • Full Member
  • *****
  • Posts: 1503
Re: vmMainPage - ShopIndex Layout Issue
« Reply #3 on: December 13, 2009, 18:57:38 pm »
Perhaps it's your Joomla Template (not your VM theme).

simonwellsuk

  • Beginner
  • *
  • Posts: 15
Re: vmMainPage - ShopIndex Layout Issue
« Reply #4 on: December 13, 2009, 21:20:58 pm »
Hi rb,
Unfortunately not . . .
I copied all the JA-Purity files from a clean install of Joomla into this projects templates directory then set it as default.
This image: http://theledlightingcompany.co.uk/images/vmstore-error-JA-Purity.jpg shows the fault in the browser and the code shown in Firebug.

Still scratching my head as to what is causing this.

rb

  • Advanced
  • Full Member
  • *****
  • Posts: 1503
Re: vmMainPage - ShopIndex Layout Issue
« Reply #5 on: December 13, 2009, 21:50:41 pm »
Quote
If I set the Display Title to NO in the module that the store front uses . . .

What module is that?  Is there input in that module that was entered before you disabled TinyMCE?  If you disable that module, do the unwanted elements disappear?

Quote
. . .it was still shown in the plugins.
or perhaps the unwanted elements are in a plugin?

simonwellsuk

  • Beginner
  • *
  • Posts: 15
Re: vmMainPage - ShopIndex Layout Issue
« Reply #6 on: December 13, 2009, 23:40:57 pm »
Quote
If I set the Display Title to NO in the module that the store front uses . . .

What module is that?  Is there input in that module that was entered before you disabled TinyMCE?  If you disable that module, do the unwanted elements disappear?

The module is called Virtuemart Product Index.  I have removed the modules folder from the live site and replaced it with a virgin upload copy, code remains.
I moved the live copy folder of the module to a new install of Joomla, and code does not appear, which leads me to conclude, the module is ok.
The module would have been setup prior to disabling TinyMCE but even now, enabling TinyMCE had no effect at removing the code.
I have even removed JCE, re-enable MCE and set it as default editor, the code still remains.

Quote
. . .it was still shown in the plugins.
or perhaps the unwanted elements are in a plugin?
The plugin folder was removed, yet it was still show in the plugin list in the admin panel.

Well, I did not want to but I followed what had been done on the TinyMCE forum and found the reference to <br mce_bogus="1"> in the tiny_mce.js file.
Removed the following code:

Code: [Select]
{s.content=q.dom.setHTML(q.getBody(),'<br mce_bogus="1" />');s.format="raw"}
Now I am really confused.

rb

  • Advanced
  • Full Member
  • *****
  • Posts: 1503
Re: vmMainPage - ShopIndex Layout Issue
« Reply #7 on: December 14, 2009, 00:21:06 am »
I couldn't find "Virtuemart Product Index", so I have no information on it.  However, if you just removed the Modules folder and replaced it, and if "Virtuemart Product Index" saves its data in the database or in a file outside the Modules folder, then perhaps the offending data is still on your system.  Try DISABLING the module (not deleting the code files, but just disabling the module).  If the offending elements are still there, try DISABLING the plugins used on that page (again, not deleting the code files but just disabling the plugins).

simonwellsuk

  • Beginner
  • *
  • Posts: 15
Re: vmMainPage - ShopIndex Layout Issue
« Reply #8 on: December 15, 2009, 13:25:21 pm »
OK, I disabled the module in Module Manager.
The module does not show now on the page, but the offending element is still there.

TinyMCE is disabled in Plugins, the element is still there . . . spooky.

I will try a few other things and update later. thanks again for your help.

PRO

  • Global Moderator
  • Super Hero
  • *
  • Posts: 10328
  • VirtueMart Version: 3+
Re: vmMainPage - ShopIndex Layout Issue
« Reply #9 on: December 15, 2009, 13:37:37 pm »
Virtuemart.php  sets up div id vmMainPage

echo '<div id="vmMainPage">'."\n";
J3.9+ VM 3.4.2
Slowest Page Speed Score (88) (Category)
Fastest Page Speed Score (94-96) (productdetails)

rb

  • Advanced
  • Full Member
  • *****
  • Posts: 1503
Re: vmMainPage - ShopIndex Layout Issue
« Reply #10 on: December 15, 2009, 13:42:10 pm »
Simon, is the offending element coming from your "Store Description"?
Admin->Store->Edit Store->Description
Perhaps when you entered the Store Description TinyMCE was active?

simonwellsuk

  • Beginner
  • *
  • Posts: 15
Re: vmMainPage - ShopIndex Layout Issue
« Reply #11 on: December 15, 2009, 14:31:14 pm »
Although TinyMCE was deleted from the Joomla Plugins folder, it was still being displayed in the Admin, Plugins.
I deleted the record from the database, but that made no change.

I had a look at the Virtuemart.php and this is the code:
Code: [Select]
echo '<div id="vmMainPage">'."\n";

// Load requested PAGE
if( file_exists( PAGEPATH.$modulename.".".$pagename.".php" )) {
if( $only_page) {
require_once( CLASSPATH . 'connectionTools.class.php' );
vmConnector::sendHeaderAndContent( 200 );
if( $func ) echo vmCommonHTML::getSuccessIndicator( $ok, $vmDisplayLogger ); /*@MWM1: Log/Debug enhancements*/
include( PAGEPATH.$modulename.".".$pagename.".php" );
// Exit gracefully
$vm_mainframe->close(true);
}
include( PAGEPATH.$modulename.".".$pagename.".php" );
}
elseif( file_exists( PAGEPATH . HOMEPAGE.'.php' )) {
include( PAGEPATH . HOMEPAGE.'.php' );
}
    else {
        include( PAGEPATH.'shop.index.php');
    }
    if ( !empty($mosConfig_caching) && $vmDoCaching) {
        echo '<span class="small">'.$VM_LANG->_('LAST_UPDATED').': '.strftime( $vendor_date_format ).'</span>';
    }
   
    echo "\n<div id=\"statusBox\" style=\"text-align:center;display:none;visibility:hidden;\"></div></div>\n";
   
    if(SHOWVERSION && !$is_popup) {
include(PAGEPATH ."footer.php");
    }
Was not too sure how much was relevant, so stopped at footer.php.
I can't see anything that could be causing it from there though.

As for Store Description, there was nothing in the text field.
I double checked using the code editor (JCE) and I noticed that the cursor default to the end of the first line.  I pressed backspace to clear, just in case, updated and then saved.
Still no change . . . . ARGHHHH!!!  :)

simonwellsuk

  • Beginner
  • *
  • Posts: 15
Re: vmMainPage - ShopIndex Layout Issue
« Reply #12 on: December 15, 2009, 14:39:44 pm »
FIXED IT!!!!!!!!!

I got bored and went to concentrate on something else, sh404SEF.
Although it had been installed and enabled, it was disabled a long while back, before this issue was first spotted.

Anyway, sh404SEF enabled.
Once the new URL for VM was active http://theledlightingcompany.co.uk/Store-||-Online-Store.html
The code was gone.
I went back to sh404SEF disabled it, got the new url of http://theledlightingcompany.co.uk/index.php?option=com_virtuemart&Itemid=53 and the page still worked.
Renabled sh404SEF and it is still working.

I have no idea why that bogus mce was being retained by sh404SEF, not sure if we will ever find out, but at least if it happens again there is something to try first.

Guys, thanks so much for your advice, it is much appreciated.
I shall also endeavor to keep my eye on the forums and help offer advise where ever my skills can, so as to help to give back to the community.

Many Thanks Again.

Simon

RHGD

  • Beginner
  • *
  • Posts: 1
Re: vmMainPage - ShopIndex Layout Issue
« Reply #13 on: March 30, 2010, 04:34:22 am »
I've got something similar happening on a site I've put together. I'm not seeing the tinymce bogus deal (although I did encounter it on a different project once upon a time...)

I've got a gap between the "page title" and the "sort by"

View here: http://www.hdblackjewelry.com/shop?page=shop.browse&category_id=6

My searching brought me to the vmMainPage div in which I find nested this useless thing which firebug tells me is causing the gap.

Code: [Select]
<div style="width:100%;float:left;">

<p><br /></p>
</div>

I can't find it anywhere to remove it and as far as I can tell it serves no purpose.

Thanks for any advice on this!

Chris8080

  • Beginner
  • *
  • Posts: 16
Re: vmMainPage - ShopIndex Layout Issue
« Reply #14 on: June 04, 2010, 19:31:43 pm »
Same here.

I never had sh404SEF installed and also tryed all the advices above.
Got stuck here .. there is no <br><br> in the code / templates but in the generated pages, it appears. :(