wet-boew / wet-boew-drupal

Drupal variant of the Web Experience Toolkit (WET)
137 stars 74 forks source link

Object doesn't support this property or method pe-ap-min.js #22

Closed mxlav closed 12 years ago

mxlav commented 12 years ago

Hi,

I am currently doing a prototype using wet and Drupal and I have encountered the following JS error

Object doesn't support this property or method pe-ap-min.js?m5kg1u, line 5 character 1853

when the script hits this statement:

c(document).on("wet-boew-dependency-loaded",function(){var e,f;for(e=0,f=a.depends.on.length;e<f;e+=1){a.depends.on[e](e)}})

From what I can tell it's dying on the .on function, which is not defined in jQuery 1.5.2.

My question is how are you guys making this work with jQuery 1.7 methods if Drupal is only using 1.5.2? Or what setup am I missing?

My set up: Drupal Core 7.14 wet-boew-wet-boew-drupal-4b183f0.zip wet-boew-wet-boew-v3.0a1-157-g2c801aa.zip

sylus commented 12 years ago

Hey you shouldn't be seeing this error I may need more informaiton. The distro include jquery update which makes drupal run in 1.7 on front end and 1.5 in backend.

mxlav commented 12 years ago

Very likely a workspace issue then as I can't get GIT or DRUSH to work here at work, everything was brought in in bits and pieces.

sylus commented 12 years ago

Hey if you require further assistance I can help you make GIT or DRUSH work through the firewall the steps involved aren't so bad.

sylus commented 12 years ago

This Thursday after a rather large commit I will also include a pre build drupal distro for convenience

mxlav commented 12 years ago

Any help would be appreciated!

Just so you know, I have applied to patch to the common.inc file as well as added proxy info to default.php, which lets me run updates from within Drupal, but no luck on the GIT & DRUSH side.

I've recently rebuilt (manually) everything and I now have both jQuerry versions running so no more error for .on

but i can't seem to get the MEGAMENU to display any child items.

sylus commented 12 years ago

Hey for git did you add the http.proxy parameter to the global config?

Something like:

git config --global http.proxy http://username:password@domain:port

mxlav commented 12 years ago

Yes I did, and GIT will attempt to start downloading files, but it just hangs at the end and I need to CTRL-Break to get back to the prompt.

RobJohnston commented 12 years ago

If the last line you saw was "wet-boew cloned from ..." then just wait a few minutes before breaking. On Windows it's moving files from the user's AppData/Local/Temp directory into where you specified in the drush make command. It can take a while.

mxlav commented 12 years ago

running clone just hangs on the following

$ git clone https://github.com/wet-boew/wet-boew-drupal.git
Cloning into 'wet-boew-drupal'...
remote: Counting objects: 837, done.
remote: Compressing objects: 100% (628/628), done.
remote: Total 837 (delta 189), reused 826 (delta 179)
Receiving objects: 100% (837/837), 5.97 MiB | 857 KiB/s, done.
Resolving deltas: 100% (189/189), done.

running DRUSH gives me the following


$ drush make --no-gitinfofile --working-copy https://github.com/wet-boew/wet-boew-drupal/raw/master/distro.build
Make new site in the current directory? (y/n): y
file_get_contents(): Filename cannot be empty make.utilities.inc:454                                           [warning]

unlink(): Invalid argument drush.inc:792                                                                       [warning]

Invalid or empty make file: https://github.com/wet-boew/wet-boew-drupal/raw/master/distro.build                  [error]
RobJohnston commented 12 years ago

You didn't include a local directory name at the end... try something like this:

drush make --no-gitinfofile --working-copy https://github.com/wet-boew/wet-boew-drupal/raw/master/distro.build C:/Users/r_johnston/Projects/wet-boew-drupal

Of course, substitute a directory path that will work for you.

mxlav commented 12 years ago

Tried it with a folder name, same error


$ drush make --no-gitinfofile --working-copy https://github.com/wet-boew/wet-boew-drupal/raw/master/distro.build c:/dow
nloads/wet3
file_get_contents(): Filename cannot be empty make.utilities.inc:454                                           [warning]

unlink(): Invalid argument drush.inc:792                                                                       [warning]

Invalid or empty make file: https://github.com/wet-boew/wet-boew-drupal/raw/master/distro.build                  [error]
RobJohnston commented 12 years ago

Well, that's a puzzler, because it's exactly what I'm typing. I'm going to guess that the version of Drush is a little old, maybe? I've got the latest msysGit (1.7.10 from my notes) and when I type

drush --version

I get

drush version 5.4

I have to admit that getting Drush and msysGit working together on Windows, especially in a non-admin account, was a bit tricky... a slash instead of a backslash would ruin everything at the last step. This maybe a good page for the Wiki.

sylus commented 12 years ago

Hey @mxlav yeah I think your problem is with drush and you trying to connect through a firewall as I have seen that error before when trying to get through my proxy. In your msysgit home directory did you add a _curlrc file with the following contents:

--proxy proxyname --proxy-user username:password

mxlav commented 12 years ago

Rob-- I have the latest DRUSH and GIT,

this is the output from --version


$ drush --version
drush version 5.4
Could not download project status information from http://updates.drupal.org/release-history/drush/7.x           [error]

Invalid argument supplied for foreach() drush.inc:234                                                          [warning]
mxlav commented 12 years ago

sylus--

this is what I tried to setup from the git cmd line

$ git config --global http.proxy http://PROD\\\<myuserid>:<mypassword>@proxy:8080 and $ git config --system http.sslcainfo /bin/curl-ca-bundle.crt

RobJohnston commented 12 years ago

Well, Drush does have --debug and --verbose switches. Maybe that will give you a bit more information if you include them.

sboots commented 12 years ago

It took a bit of poking here too to get Drush and msysGit working on Windows; the wiki instructions (https://github.com/wet-boew/wet-boew-drupal/blob/master/README.md#windows) in hindsight are spot on, but for fellow newbies, it's:

Then, type "cd " (so eg. "cd /c/xampp/htdocs") to switch to the folder where Drupal was installed to, and then run the Drush install command in step 4.

Man. And then when it works, so crazy. One click switching from CLF 2 to the WET usability theme = a very exciting moment.

This post is probably really old news to all of you (and doesn't deal with proxies or curl), but at some point if a new-user-oriented wiki install page was made it might help. To sylus and the crew: keep on rocking - really looking forward to the updates later this week.

sylus commented 12 years ago

Hey @mxlav yeah you have to set up both git and drush. It looks like you have set up git but not drush which uses curl on windows to receive files. This is why you have to include a _curlrc file in msysgit root with the proxy information.

You can verify drush isn't working by trying to curl a file and I bet it will fail. Basically in order for drush to work on windows CURL needs to work. Do you get a success when trying the following command?

curl -o adaptive.zip http://ftp.drupal.org/files/projects/adaptivetheme-7.x-3.0-rc4.zip

If you don't this is your problem and you just need to add the _curlrc file with relevant info and then drush should work.

sylus commented 12 years ago

Thanks @sboots for the writeup and suggestion after the new release polished documentation will be our new priority as well as screencasts. We will be hosting all of this on our new demo site as well.

mxlav commented 12 years ago

baby steps.. :-)

Tried the curl command above, didn't work.

Created the _curl file with the proxy info and tried it again and it now returns

$ curl -o adaptive.zip http://ftp.drupal.org/files/projects/adaptivetheme-7.x-3.0-rc4.zip
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   863  100   863    0     0    511      0  0:00:01  0:00:01 --:--:--   516

so i decided to try git clone again to see if that, same results, hangs on deltas

$ git clone https://github.com/wet-boew/wet-boew.git
Cloning into 'wet-boew'...
remote: Counting objects: 3973, done.
remote: Compressing objects: 100% (2017/2017), done.
remote: Total 3973 (delta 2341), reused 3489 (delta 1867)
Receiving objects: 100% (3973/3973), 10.14 MiB | 521 KiB/s, done.
Resolving deltas: 100% (2341/2341), done.

so had to CTRL-Break out, and for fun I tried the drush make command (with -d) and got the same

$ drush make -d --no-gitinfofile --working-copy https://github.com/wet-boew/wet-boew-drupal/raw/master/distro.build foo

Bootstrap to phase 0. [0.07 sec, 2.46 MB]                            [bootstrap]
Drush bootstrap phase : _drush_bootstrap_drush() [0.17 sec, 2.6 MB]  [bootstrap]
Cache HIT cid: 5.4-commandfiles-0-6756d3f71e7ba1b98877e532b548b2a8 [0.58 sec, 2.61 MB]                           [debug]

Bootstrap to phase 0. [0.7 sec, 5.5 MB]                                                                      [bootstrap]

Bootstrap to phase 0. [0.75 sec, 5.5 MB]                                                                     [bootstrap]

Found command: make (commandfile=make) [0.8 sec, 5.5 MB]                                                     [bootstrap]

Loading release_info engine. [0.82 sec, 5.51 MB]                                                                [notice]

Executing: which wget
  'which' is not recognized as an internal or external command,
  operable program or batch file.
Executing: curl -s -L --connect-timeout 30 -o "C:\\Documents and Settings\\mxl140\\Local Settings\\Temp\\dow16E.tmp" htt
ps://github.com/wet-boew/wet-boew-drupal/raw/master/distro.build
file_get_contents(): Filename cannot be empty make.utilities.inc:454 [3.88 sec, 5.66 MB]                       [warning]

Calling unlink() [3.88 sec, 5.66 MB]                                                                             [debug]

unlink(): Invalid argument drush.inc:792 [3.88 sec, 5.67 MB]                                                   [warning]

Invalid or empty make file: https://github.com/wet-boew/wet-boew-drupal/raw/master/distro.build [3.88 sec,       [error]

5.67 MB]
Command dispatch complete [3.88 sec, 5.64 MB]                                                                   [notice]

Peak memory usage was 6.26 MB [3.88 sec, 5.64 MB]                                                               [memory]
sylus commented 12 years ago

Hey can you remove the following from your git info you shouldn't need it and could be causing your git problems

remove: git config --system http.sslcainfo /bin/curl-ca-bundle.crt

Also depending on your computer you may have to wait up to 30 secs for resolving of deltas to finish for wet-boew

mxlav commented 12 years ago

I left last night while it was resolving Deltas and it was still hanging there this morning when I came in....

Removing that parameter brakes it even more

$ git clone https://github.com/wet-boew/wet-boew.git
Cloning into 'wet-boew'...
error: SSL certificate problem, verify that the CA cert is OK. Details:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed while accessing https://github.com/wet
-boew/wet-boew.git/info/refs
fatal: HTTP request failed

any other ideas?

sylus commented 12 years ago

I am inclined to think it is related to the SSL certification. I do not need this and I think everyone else who got it working has not needed it either. Do you have a flag still set somewhere for GIT?

On the other hand your proxy could be extra stringent and may require you have a valid cert. Are you using msysgit and running these command inside of this shell? It is important as I believe msysgit provides the certs needed. Otherwise you might try setting GIT_CURL_VERBOSE=1 to see what is going on.

Comment #2 in this series of posts looks helpful: http://stackoverflow.com/questions/3777075/https-github-access

sylus commented 12 years ago

Actually I think I found the fix for you!

When you run git config --list does your ouput look close to this?

I think http.sslcainfo=/bin/curl-ca-bundle.crt and especially http.sslverify=false will fix your problems related to SSL. This explains why you freeze when working with the deltas it never completes because it is looking for the right certs which you don't have, so best to just disable it. The following it what my git config looks like.

core.symlinks=false core.autocrlf=input color.diff=auto color.status=auto color.branch=auto color.interactive=true pack.packsizelimit=2g help.format=html http.sslcainfo=/bin/curl-ca-bundle.crt sendemail.smtpserver=/bin/msmtp.exe diff.astextplain.textconv=astextplain rebase.autosquash=true http.proxy=http://user:password@proxy:port http.sslverify=false user.name=NAME user.email=EMAIL

mxlav commented 12 years ago

i added the sslverify and removed sslcainfo

$ git config -l
core.symlinks=false
core.autocrlf=true
color.diff=auto
color.status=auto
color.branch=auto
color.interactive=true
pack.packsizelimit=2g
help.format=html
sendemail.smtpserver=/bin/msmtp.exe
diff.astextplain.textconv=astextplain
rebase.autosquash=true
user.name=myuserId
user.email=myemail
credential.helper=cache
http.proxy=http://user:password@proxy:port
http.sslverify=false
https.proxy=http://user:password@proxy:port

... with the same results :-(

sylus commented 12 years ago

DId you add this line as well? : http.sslcainfo=/bin/curl-ca-bundle.crt

Try using gitverbose and paste the output. Past that you can always call me and we can debug together or something ^^ Don't worry we will get this working. Up for a call tomorrow?

mxlav commented 12 years ago

I really appreciate the help btw!

Yes I did try with sslcainfo set and unset.

I decided to uninstall and reinstall GIT .. you never know...I tried to install msysgit, but this just get stuck on Resolving Deltas, so I installed the GitForWindows instead (which is what I had initially) ... and I'm still back where I started.

I asked around work to see if anyone else would of attempted any of this and I might of found someone. If he can't help me, I'll get back in touch with you :-)

sylus commented 12 years ago

As have not heard back and can't reproduce assuming this issue is fixed. Please reopen as needed.

mxlav commented 12 years ago

Well I asked around here and couldn't find any help, so I shelfed this issue for a while. Then I wanted to update to the adaptive theme, so I decide to try a get git and drush going..maybe this time it will work!! :-) .. didn't :-S

Any chances you could either provide the pre-made https://github.com/sylus/wet-boew-drupal-compiled

or maybe we can get into contact and try to figure this out?

sylus commented 12 years ago

I could put the premade but am planning on waiting till Sept 17 our release date as am promising no upgrade path till that point.

Ideally I'd like to fix your problem and update the documentation for anyone else having this issue. If you are free on Monday perhaps we could talk on the telephone and run through a checklist of things? ^_^

mxlav commented 12 years ago

I am free Monday, how do we get in contact?

sylus commented 12 years ago

You can send me your contact details at william.hearn@statcan.gc.ca

mxlav commented 12 years ago

Very cool! I just sent you my coordinates..talk to you then.

mxlav commented 11 years ago

@sylus, I decided to give it another go recently, just wanted to give you a quick update.

Using SSH to git clone as recommended by @LaurentGoderre in my post https://github.com/wet-boew/wet-boew/issues/686 , no issues; not getting stuck on DELTAS, very cool...but now I hang during drush make, probably same reasons it was hanging in GIT.

So close...though i would finally be able to do a full build from work... Is there any way to change the protocol in the drush make?

alar2 commented 11 years ago

On Windows 2008 Server R2 within NRCan


$ git clone https://github.com/wet-boew/wet-boew-drupal.git /e/temp/wet-boew-drupal; Cloning into 'e:/temp/wet-boew-drupal'... remote: Counting objects: 13546, done. remote: Compressing objects: 100% (4641/4641), done. rRemote: Total 13546 (delta 8252), reused 13222 (delta 8035)eceiving objects: 10 Receiving objects: 100% (13546/13546), 14.22 MiB | 4.47 MiB/s, done.

Resolving deltas: 100% (8252/8252), done.


Running: drush make --prepare-install --no-gitinfofile --working-copy E:\temp\wet-boew-drupal\build-wetkit.make --yes -v

Project drupal contains: [success]

Command dispatch complete [notice] drupal-7.22 downloaded. [ok]

Executing: curl --fail -s -L --connect-timeout 30 -o "C:\Users\username\AppData\Local\Temp\3\dowBD1B.tmp" http://drupal.org/files/issues/install-redirect-on-empty-database-728702-36.patch Unable to download [error]

http://drupal.org/files/issues/install-redirect-on-empty-database-728702-36.patch. php.exe "C:\ProgramData\Drush\drush.php" --php=php.exe [notice]

--backend=2 make-process "C:\Users\LO759D~1\AppData\Local\Temp\3/make_tmp_1370639742_51b24d7e070e7"2>&1 Loading release_info engine. [notice] Unable to clone wetkit from [error] https://github.com/wet-boew/wet-boew-drupal.git. Command dispatch complete [notice] Command dispatch complete [notice] E:\htdocs\sites\drupal_wet>

+++++++++++++++++++++++++++++++++++++++++++++++++++++++ From phpinfo.php +++++++++++++++++++++++++++++++++++++++++++++++++++++ curl

cURL support enabled cURL Information 7.24.0 Age 3 Features AsynchDNS Yes Debug No GSS-Negotiate Yes IDN No IPv6 Yes Largefile Yes NTLM Yes SPNEGO No SSL Yes SSPI Yes krb4 No libz Yes CharConv No Protocols dict, file, ftp, ftps, gopher, http, https, imap, imaps, ldap, pop3, pop3s, rtsp, scp, sftp, smtp, smtps, telnet, tftp Host i386-pc-win32 SSL Version OpenSSL/0.9.8x ZLib Version 1.2.5 libSSH Version libssh2/1.3.0 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ wget +++++++++++++++++++++++++++++++++++++++++++++ E:\htdocs\sites\drupal_wet>wget --version SYSTEM_WGETRC = c:/progra~1/wget/etc/wgetrc syswgetrc = C:\Program Files (x86)\Drush\GnuWin32/etc/wgetrc GNU Wget 1.11.4 +++++++++++++++++++++++++++++++++++++++++++++

Any suggestions at all much appreciated!!!

lampson commented 11 years ago

My guess would be your corporate firewall. Make sure you create a file called _curlrc in your home directory and specify the proxy settings described here: https://github.com/wet-boew/wet-boew-drupal/wiki/Download%2C-Installation%2C-and-Update#wiki-Configure_your_proxy_if_applicable

But I believe wget should be getting used instead of curl as it's present. This was mentioned here: https://github.com/wet-boew/wet-boew-drupal/issues/74#issuecomment-6860211

But maybe it's failing and trying to curl instead... dunno. Make sure you have http.proxy=http://user:password@proxy:port specified in your git config.

Then try to do a simple wget and a curl to ensure this stuff works before doing the drush make.

Are you using msysgit? I have only tried drush make with unix style syntax and not windows.

alar2 commented 11 years ago

For the wget it seems I had to add a --no-check-certificate as in $ wget https://drupal.org/files/1994654-add-plugin-alter.patch --no-check-certificate I'm using GitHub Git Shell. Mysysgit was too -- what shall I say? Windowsy ;)