VirtueMart Forum

VirtueMart Dev/Coding Central: VM1 (old version) => Quality & Testing VirtueMart 1.1.x => Virtuemart 1.1 Development (Archiv) => Q&T Resolved => Topic started by: wojtha on May 02, 2008, 12:29:58 PM

Title: Fetchscript Bug
Post by: wojtha on May 02, 2008, 12:29:58 PM
Hi,

I found, that GreyBox does not work for me in 1.1 Stable version (Beta 3 worked). I've found this bug in Firefox JS console:

Error: GB_ROOT_DIR is not defined
Source file: http://.../components/com_virtuemart/fetchscript.php?gzip=0&subdir[0]=/themes/peoplesplace&file[0]=theme.js&subdir[1]=/js&file[1]=sleight.js&subdir[2]=/js/mootools&file[2]=mootools-release-1.11.js&subdir[3]=/js/mootools&file[3]=mooPrompt.js&subdir[4]=/js/slimbox/js&file[4]=slimbox.js&subdir[5]=/js/greybox&file[5]=AJS.js&subdir[6]=/js/greybox&file[6]=AJS_fx.js&subdir[7]=/js/greybox&file[7]=gb_scripts.js
Line: 1333


I've found that this constant is generated in the <head> tag, but after fetchscript.

And solution?

Change order of the javascript generation in mainframe.class.php around line 261

Change order of these two blocks of code...

Before

if( $i> 0 ) { // block #1
  ...
}
foreach( $otherscripts as $otherscript ) { // block #2
  if( !empty($otherscript['src'])) {
  ...
  }
}


After

foreach( $otherscripts as $otherscript ) { // block #2
  if( !empty($otherscript['src'])) {
  ...
  }
}
if( $i> 0 ) { // block #1
  ...
}
Title: Re: Fetchscript Bug
Post by: lipmat on September 02, 2008, 17:17:58 PM
It really solves the problem,

VM 1.1.2 also has this bug.


Thank you!!!!
lipmat
Title: Re: Fetchscript Bug
Post by: woonydanny on September 20, 2008, 13:47:59 PM
i think it works for me as well on VM1.1.2 and joomla 1.5.6, THANKYOU!!!!!!

EDIT: i realised that the greybox setting is in the theme settings.  :-[
Title: Re: Fetchscript Bug
Post by: austen1977 on November 30, 2008, 02:29:25 AM
I am running VM1.1.2 on Joomla 1.5.8. I tried the solution mentioned above, but I'm not getting a different result. I still end up getting sent to the shopping cart page. I checked to make sure that I have the settings correct in both the module and the theme. Any ideas or help as to what might be going on would be greatly appreciated.
Title: Re: Fetchscript Bug
Post by: amilaraja on February 28, 2009, 08:04:58 AM
had the same bug .
This worked for me  too , I run  VM 1.1.3 on Joomla 1.5.9!

thank you sooooo much!

Title: Re: Fetchscript Bug
Post by: Michael West on March 05, 2009, 10:52:24 AM
Update: March 15, 2009

I thought this would fix my website by patching Line 261:
/administrator/components/com_virtuemart/classes/mainframe.class.php and there was a copy attached. But, one of my customers reported it did not.

Changelog VM build 1663
http://forum.virtuemart.net/index.php?topic=31381.0

Peter has told me the SVN is the place to address this issue, using the proper procedures and channels.

If we could get some programmers involved, maybe we could fix this, once and for all?


1. Could someone clarify the location of the file?

Patched Line 261: /administrator/components/com_virtuemart/classes/mainframe.class.php and there is a copy attached.

2. Could we get this Entered and Fixed in Bugtracker?

Confirmed: Error: GB_ROOT_DIR is not defined
Source File: http://www.website.com/components/com_virtuemart/fetchscript.php?gzip=0&subdir[0]=/themes/default&file[0]=theme.js&subdir[1]=/js/greybox&file[1]=AJS.js&subdir[2]=/js/greybox&file[2]=AJS_fx.js&subdir[3]=/js/greybox&file[3]=gb_scripts.js&subdir[4]=/js/mootools&file[4]=mootools-release-1.11.js&subdir[5]=/js/mootools&file[5]=mooPrompt.js
Line: 879

Current VM 1.1.3 with current "Operation Aborted" Hotfix.
Title: Re: Fetchscript Bug
Post by: aravot on March 05, 2009, 19:56:11 PM
Thank you, fixed in SVN
Title: Re: Fetchscript Bug
Post by: grayceworks on March 12, 2009, 03:03:00 AM
Used the attached files from the IE fix and cleared cache with NO EFFECT. Only having this problem on the backend in IE7 when I try to edit..


Used the attached file from this thread mainframe.class.php and now I can edit, however every page in the admin of vm gives a runtime error: Line 61 "Ext undefined" for this line:

<script type="text/javascript">Ext.BLANK_IMAGE_URL = "http://localhost/components/com_virtuemart/js/extjs2/images/default/s.gif";

Never had an issue on the front end display.

Will just have to continue using FF, but when I'm at different locations working, they don't always have FF installed...

Is there any update on this? This is on both a local install and on an online install of VM 1.1.3 on Joomla 1.5.9
Title: Re: Fetchscript Bug
Post by: Michael West on March 15, 2009, 20:32:47 PM
Update: March 15, 2009

I thought this would fix my website by patching Line 261:
/administrator/components/com_virtuemart/classes/mainframe.class.php and there was a copy attached. But, one of my customers reported it did not.

Changelog VM build 1663
http://forum.virtuemart.net/index.php?topic=31381.0

Peter has told me the SVN is the place to address this issue, using the proper procedures and channels.

If we could get some programmers involved, maybe we could fix this, once and for all?
Title: Re: Fetchscript Bug
Post by: skippy31 on March 24, 2009, 16:36:43 PM
I'm running into this issue was well with VM 1.1.3 and the IE patch applied.

It's not entirely clear to me however from the discussion above how to fix this issue.  Tried downloading the 1.1.4 package above, but the files that came with it were not organized in a way I was familiar with.

If anyone has a short term patch or hack for this issue please do tell.  This issue is stopping any checkout on my site.

Mat.

EDIT:  Solved for now by just turning off the grey box feature in the template.
Title: Re: Fetchscript Bug
Post by: fx3tech on May 30, 2009, 03:37:34 AM
Site on Joomla 1.1.x with VM 1.1.3,

Cannot add new additional attributes/properties due to javascript not functioning as described above. Unable to do a line 261 patch in mainframe.class.php as code is not the same - see below.

Line 255 through 265
"   }

   /**
    * Adds a script to the page
    *
    * @access   public"


Problem occurs in all web browsers (Firefox, Safari, IE, etc...) Am unable to decipher the comment about "turning off greybox feature in template" and no forum search is turning up the answer.

Customer store site is offline until I can add attributes/properties. Please advise as to fix/workaround ASAP.

Thanks!

FX3Tech

Title: Re: Fetchscript Bug
Post by: Michael West on May 30, 2009, 06:47:29 AM
"Turning off greybox feature in template" is done through Joomla Admin then virtuemart, then Configuration, then Site Configuration.



[attachment cleanup by admin]
Title: Re: Fetchscript Bug
Post by: fx3tech on June 11, 2009, 23:39:49 PM
Thnx - still doesn't solve script problems but I have worked around for now.