Directory "javascript" is being completely ignored - javascript

Good Afternoon,
I am having a very specific problem with my Apache2/Ubuntu Setup, essentially, whenever I attempt to use "javascript" as a directory name, everything inside the folder is essentially ignored and when scripts or humans try to access files within the folder, they simply 404.
I have renamed the folder to "javascript2", and the files appeared. Named back to "javascript" and they disappeared when trying to navigate to them again.
I can't simply rename the folder as this is where mantis is calling, and besides, this shouldn't be happening.
Is it a reserved word? Do I have a stupid option enabled? Any suggestions / help is appreciated

This is the default behavior of Apache apparently, I had to comment out the following in /etc/apache2/conf.d/javascript-common.conf:
Alias /javascript /usr/share/javascript/
All is good now, thanks for the help anyway and hopefully this may be useful for someone else at some point!

Related

How to create a symlink within browserFS

I'm trying to create a symlink inside of BrowserFS.
I can confirm that BrowserFS can read sym links just fine... (I tested by making a zip file and loading it in, and doing fs.readFile and all is A-OK)
However, when I try to create a sym link via fs.symlink, I get an Error, I assume this is meaning it is not supported.
Can any of the folks out there that may use browserFS know how to propertly create, or any workarounds for creating symlinks?
One idea is to create the contents of a symlink and set file modes, but I had a hard time finding the exact way to do that. Any help appreciated!
I've included a codesandbox in case anyone is interested! https://codesandbox.io/s/43wroyjy9w

Basic Browserify example

I've been banging my head against the wall for a while now, trying to get browserify working for me. I'm starting with what should be really the simplest example, replacing a javascript page with its browserified page (when there's no requires in it!). So, here's what I did:
I had a page, "javascript.js" that was already incorporated into my site. I went to its folder, and ran the command
browserify ./javascript.js > bundle.js
I figure that should be an identical file (functionally) to javascript.js. So, I go to my index.jade file and replace
script(src='javascript.js')
with
script(src='bundle.js')
(Those are the equivalent of script tags in html)
But it didn't work! The website now throws the error that a certain variable from my browserified file is undefined (the error comes from a function call in another file). What gives? What am I doing wrong? Am I thinking about bundles incorrectly? It seems like this is following instructions, but it's just not working.
Thanks for the help in advanced, I've really been at this for a while now with no progress.

Not able to load the ext-all.js file

i have a couple of questions:
first i want to describe the things i am using.
1) Dynamic project.
2) using tomcat - 7.
3) put the extjs folder in WebContent folder.
i am just learning the things ... so might be have some stupid questions .. sorry for that.
so i have confusion that ext-all.js not uploaded ...might be because of one of the reason...
1) Use of tomcat (instead i need to use apache) .... please give me some explanation on that.
2) i need to put extjs folder somewhere else ... (not sure about this).
Please help
May or may not be the answer.
Try putting ./ infront of the path
<script src="./extjs/ext-all.js" type="text/javascript"/>
You didn't include the location of your html file, so their is no way of knowing where you have to point the script tag to.
Hope this helps a little
Cheers,
Demetry

Extending an extension (SCP) in Magento causes JS errors?

I don't think this is an actual JS error, but the symptoms are JS related. I have a Magento 1.7.0.2 installation with SCP (Simple Configurable Products) which works 100% as I want/expect. In my early development I added some methods to 1 specific file in the SCP module, app/code/community/OrganicInternet/SimpleConfigurableProducts/Catalog/Model/Product/Type/Configurable.php.
With these methods inside of the SCP module everything works, however I realise now I really should have created an additional module in the local code pool that extends SCP and put my additional methods in there. So I created Bendart_Matrix. I cut the 3 methods out of SCP's Configurable.php and placed them in my own module, app/code/local/Bendart/Matrix/Catalog/Model/Product/Type/Configurable.php. Whilst the page still loads, there appear to be some JS errors which ultimately relate to the Product JS Object not being created correctly. It doesn't get created with the .Options method like it does when my methods are part of SCP.
I can't find a logical reason as to why this is, so I've created some gists of my module (Configurable.php, config.xml and Bendart_Matrix.xml) and the same files from SCP. Once again, if I disable or remove my module and switch the methods back to SCP files, it works. Weird?
SCP config.xml: https://gist.github.com/4327015
SCP Module Declaration XML: https://gist.github.com/4327012
SCP Configurable.php (minus the methods from my file: https://gist.github.com/4326996
My config.xml: https://gist.github.com/4326988
My Module Declaration XML: https://gist.github.com/4326986
My Configurable.php (just the methods in question): https://gist.github.com/4326909
Any help or advice is appreciated as I want to do it properly and remove my methods from the SCP module but there appears to be some dependencies I've missed or something?
Based on the information you posted, I think the most likely issue is going to be that you have made a change in your layout update that removes a template that is required. You seem to be extending the module correctly and a JS error in generally related to templates in this situation.
P.S. Slight heads up, came to our attention this morning that SCP doesn't function correctly if somebody adds a configurable product to their basket from the Wishlist page (it adds both the configurable and the simple, this may not matter to you, but with our customised exports and adminhtml updates this caused issues). If you have Wishlist enabled you should bare this in mind.
Ok, I've fixed one issue thanks to #Cags.
I noticed whilst turning template hints on that scpoptions.phtml wasn't being included in comparison to my live working version. I added the following lines (taken from simpleconfigurableproducts.xml)
<reference name="product.info.options">
<action method="setTemplate"><template>catalog/product/view/scpoptions.phtml</template></action>
</reference>
This fixed all the JS warnings about Product.Options and any other warnings I had. It also ensured that the product price was updated correctly once I started selecting custom options etc.
Now, one last issue, when I load the product page, before I select ANYTHING, the price shows as 0.00. As soon as I select a drop-down the price "kicks in" and it works from there on in, it just appears to be the initial page load. I've compared template files with my live site that works (but doesn't have my module) so again it's something to do with the inclusion of my module, but what?
Cheers.

nXhtml (No javascript-mode/eruby-javascript)

I've just installed nXhtml by downloading their zip file, extracting the archive into my home directory and adding (load "/home/spinlock/nxhtml/autostart.el") to my .emacs file. My problem is that when I try to edit a .js.erb file, I'm getting the error:
(No javascript-mode/eruby-javascript)
and I'm not getting the syntax highlighting that I'd expect (for instance, comments are the same color as javascript code). However, when I move the cursor inside a Ruby section of this file, that notice changes to:
(Ruby/eruby-javascript)
which I take as a good sign plus it does look like I've got the proper Ruby syntax highlighting in this part of the buffer (e.g. comments are show in red font).
I assume that I need to add a configuration file that tells emacs how to manage javascript-mode but I have no clue how to do this. Any help would be greatly appreciated.
Thanks!

Categories