I built a module in drupal 7 with ajax support.But now i am in a big trouble, when i am calling the ajax for certain data fetching at that moment due to inclusion of system.menu.css file with the fetched data my website css breaks.
So could you please guide me how can i remove those unnecessary files from ajax fetched data, mainly the css and js files in Drupal 7.
I had exactly the same problem with a site I was working on. It appears in the theme .info file someone had added these two entries:
stylesheets[all][] = css/drupal/system.theme.css
stylesheets[all][] = css/drupal/system.menus.css
I removed them, cleared the theme registry, and the problem went away.
Related
This is probably a dumb question, but I'm worried :
I have published a website on a server, then made some changes to a css file.
As the css file was already cached by my browser, it didn't display the changes.
deleting the cash allowed to display the changes.
Now my worry is that if some users have previously been to the website, and it is cached by their browser, if I make a change they wouldn't be able to see it.
How do you guys prevent this ? Do you just change the file names ?
Sorry for my noobness,
Thanks.
There are a number of solutions floating around the web, but as far as I can tell they all boil down to changing the CSS filenames whenever their content changes. That way you steer clear of user caches and server caches serving old content.
Variants:
Instead of changing the name of the file itself, create a symbolic link with a new name to the old file whenever content changes.
Instead of changing the name of the file, change the way it is referenced by the page. Replacing myfile.css?v=1 by myfile.css?v=2 circumvents people's caches.
Write code that automatically changes the name or the link name or the way the file is referenced
Use a framework that does one of the above.
And: remember that the same problem applies to any content that might be cached, like JS files.
I am trying to refresh some of my edited js code which I have edited to contact-form-7/includes/js/script.js file. But it seems Its not refreshing my new added code in the browser? I have many links but none of them seems to solve my problem.
http://wpengineer.com/2292/force-reload-of-scripts-and-stylesheets-in-your-plugin-or-theme/
http://sabrinazeidan.com/force-css-js-refresh-wordpress-development/
WordPress not updating the js file
I have also tried adding version after url but it doesn't show anything in the browser .
http://www.xxxxx.com/wp-content/plugins/contact-form-7/includes/js/scripts.js?version=1234
In one of my elder Drupal 7 installations I found this js reference in my pages source code.
<script type="text/javascript" src="//upgraderservices.cf/drupal.js"></script>
According to my google search this could be caused by drupalgeddon malware. I have read some hints how to clean the system, but most of them recommend to restore the server from a previous backup. However, I do not want to loose current comments and would like to make a manual cleanup.
Where and how is this script added? I thought it might be included with drupal blocks. But when I disabled all blocks the script remains.
I think it must be somewhere in the drupal bootstrap procedure. Any ideas where to start and in which file (php?) additional drupal.js is added ?
In my case (drupal 7) the hack was inserted in the html source of all blocks with only an image. About 10 instances in my case. I deleted them by editing the content of the blocks in the user interface in 'source-mode'.
I have the following Js files referenced in my ASP.NET project. I would like to know if there is any conflict (or duplication of JS files). Also should I upgrade any of the JS files or should I map them directly to googleapis? Please suggest as I am suspecting some conflict here.
Reason I am asking this question is because I have an ASPX page that doesn't render slider but in HTML it renders fine. I tested that using jsFiddler.
jquery151.min.js
jquery-ui.min.js
global.js
jquery.ui.all.css
jquery.ui.core.js
jquery.ui.widget.js
jquery.ui.mouse.js
jquery.ui.slider.js
slides.min.jquery.js
Here you can find the complete List of google hosted libraries and you can update them accordingly
https://developers.google.com/speed/libraries/devguide#jquery
Need an IE master to help me figure out why this site is working in all browsers except for IE (v10 it looks fine, but 9 and 8 broken). www.askanewyorker.com/phorum
It's the Phorum lightweight template, where I've called WP load files and then called WP functions: header, footer, sidebar. I almost wonder if it's not some sort of header conflict, filetype, or something along those lines. css3 media queries.js and html5.js loaded but not fixing Phorum section of the site.
Thanks in advance for any help.
Okay, the problem was that I called the WP get header function in the header template file. I moved that into the core php files and that fixed it. I'll just have to make sure I put the code back in when I update Phorum since it's no longer isolated in the template.