News:

Looking for documentation? Take a look on our wiki

Main Menu

Fetchscript Bug

Started by wojtha, May 02, 2008, 12:29:58 PM

Previous topic - Next topic

wojtha

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
  ...
}

lipmat

It really solves the problem,

VM 1.1.2 also has this bug.


Thank you!!!!
lipmat

woonydanny

#2
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.  :-[

austen1977

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.

amilaraja

had the same bug .
This worked for me  too , I run  VM 1.1.3 on Joomla 1.5.9!

thank you sooooo much!


Michael West

#5
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
  • =/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.
Try posting a link to your website in your profile, or a link to the error page if possible.

A picture is worth a thousand words. For XP get http://www.bhelpuri.net/Snippy/SnippyDownload.htm, or...

Windows Vista has a Snipping Tool in the Accessories area of the Start Button.

"We look for things that make us go, computer things."
(StarTrek NG: Pakleds Episode http://www.youtube.com/watch?v=4lxIL1WlxSQ).


Have you read the manual? http://virtuemart.net/documentation/User_Manual/index.html I did, huh?


grayceworks

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
searching for solutions
====================================
Joomla 1.5.9
VirtueMart 1.1.3
Linux/Apache|PHP5|mySQL5
Firefox 3.0.6 | Internet Exploder 7 
Windoze XP sp3 | Suse 10

Michael West

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?
Try posting a link to your website in your profile, or a link to the error page if possible.

A picture is worth a thousand words. For XP get http://www.bhelpuri.net/Snippy/SnippyDownload.htm, or...

Windows Vista has a Snipping Tool in the Accessories area of the Start Button.

"We look for things that make us go, computer things."
(StarTrek NG: Pakleds Episode http://www.youtube.com/watch?v=4lxIL1WlxSQ).


Have you read the manual? http://virtuemart.net/documentation/User_Manual/index.html I did, huh?

skippy31

#9
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.
Products for the Canadian Diver
http://www.scubageek.ca

http://www.webdesignguy.ca

fx3tech

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


Michael West

#11
"Turning off greybox feature in template" is done through Joomla Admin then virtuemart, then Configuration, then Site Configuration.



[attachment cleanup by admin]
Try posting a link to your website in your profile, or a link to the error page if possible.

A picture is worth a thousand words. For XP get http://www.bhelpuri.net/Snippy/SnippyDownload.htm, or...

Windows Vista has a Snipping Tool in the Accessories area of the Start Button.

"We look for things that make us go, computer things."
(StarTrek NG: Pakleds Episode http://www.youtube.com/watch?v=4lxIL1WlxSQ).


Have you read the manual? http://virtuemart.net/documentation/User_Manual/index.html I did, huh?

fx3tech

Thnx - still doesn't solve script problems but I have worked around for now.