Magento Admin panel - Dropdowns not working/showing - javascript

After logging into my admin panel in Magento, the dropdowns in the admin panel are not showing up. JavaScript error console revealed some errors. After a bit of googling I have tried:
changing permisions of js folder to 755
all .js files and index.php in js folder to 644
Finally I also tried replacing the is folder with the original js folder of the Magento package. However nothing seems to work.

The reason why the dropdowns won't show is that Magento uses JavaScript to assign classes to the hovered menu elements and uses those classes in the CSS to show dropdowns. Errors in the javascript prevent from loading every other javascript that appear after the line with an error.
Don't replace js folder with default one - every new js that's there is there for a reason (it sounds like your website was customized, so removing js files responsible for custom features won't help you). Instead, you have to work on fixing every javascript error.
Please provide more data on those errors or a link to your website.

Related

Working in PythonAnywhere: CSS files load, but Javascript does not work

My static files are directing to the correct place since my CSS files are loading. However, I have a JS file that works locally and on codepen, but not on the browser. I have tried placing my JS files in a different folder and directing there and I have changed the script src (from /static/button.js to https://www.yoginib.org/static/button.js) - Neither of these have worked. I am not getting any errors when I check developer tools either.
I am not experienced with jQuery or PythonAnywhere so I am not sure what else to try.
I have some animations on the buttons, so I am not sure if that's affecting the functionality.
This is the HTML (where I reference the JS:
This is also the HTML, showing the buttons that I want to affect using JS:
This is the JavaScript:
This is a screenshot of the buttons on the actual webpage and the text underneath, which should change to different text with a button click:
This is the link to the webpage: https://www.yoginib.org/arena.html

Tagdiv Composer loads to infinity: Wordpress Plugin

I am new to Wordpress.
I am working on a news website with the Newspaper theme and Tagdiv composer plugin
After working for a week I have developed a problem which I explain below.
Whenever I want to edit pages with TagDiv Composer, the large spinner icon shows and starts loading. It stays there like forever until I close the page.
In the console (from Developer Tools), I found 2 errors which are shown in the pictures below. The error are actually from in js_files_for_wrapper.min.js
I identified the actual error for Error 1 one this line of code JSON.stringify([d[0].shortcode.attrs.named]) so I made the following deductions:
The problem started after I saved a custom shortcode named “shortcode“ which I think is an object in the js_files_for_wrapper.min.js as per the error line above.
If what I think about the cause is true, could anyone help me with identifying where the custom shortcode I created was saved, and how to delete it?
Was having a similar issue on a brand new theme setup. tagdiv Composer was loading to infinity. Further, my Header and Footer menus were not showing. Had to click to activate the Header and Footer check boxes on this URL, which fixe things: https://yourdomain.com/wp-admin/admin.php?page=tdb_cloud_templates
I wasn't able to contact the theme support because my account was compromised.
However, after long testing and failing, I finally resolved to resetting the theme options from the theme panel.
That solved it, although I had to set my custom colours and fonts, as well as custom CSS all over again.

Php include method and Jquery load method?

I have 3 folders:
Admin
Home
Profile
Each folders have different css, js, and php files in it with more than 1000 lines, so that's why I kept them in separate folders.
But now I want to manage the whole indexes is one, so I made another php file with name All.php and I made a radio button in it to show and hide these three files (admin, home and profile).
I have tried to include these files by ?php include(filename.php) ? method, but the css wasn't working with it.
Then I copied the css and js link files from the Admin.php to All.php and it was working fine.
But the problem is when I copied more files(css and js links) with different names to All.php, some conflicts appear, and the style of Admin.php got shattered.
I don't know whats wrong with it, and it's same with jquery.load() method. The css doesn't work in All.php when I load a file from three of these, and when here too I copied the links and sources then, many of the functionalities were not working.
Look up cascade, inheritance and specificity. You possibly have conflicting selectors in css files. What kind of functionalities are not working? Need code for that!

javascript in Joomla custom module

I have a code generated by "highslide" software and what it does is to create an image gallery.
This code consists of .css html and javascript.
If I place the htmal code in the Joomla's "index.php" file and then the rest of the file in the root directory then the image gallery is working and is placed in every page in Joomla.
I do not want this. Is there a way of assigning that image gallery to only pages I choose?
Or is there a way to find out what is the index.php main file for that specific page I need to have the gallery and paste the code in there?
I have tried to insert the code in a custom module via the Joomla's editor but when I click on save then it compiles the code and remove certain parts of it and cannot work.
It removes the link to javascript and to css file.
Is there a way without any other third party extension to have that code into the custom module without then Joomla eliminate the half of the code?
Thank you,
Best Regards,
Andreas Achilleos
I would not add things like this to your index.php file. This is Joomla, not a static html website ;)
You have 3 options:
Option 1 would be to develop your own module and install it on your Joomla site. This option would take the longest amount of time and would require you to get your handy in a bit of coding.
Option 2 would be to firstly download, install and enable a plugin called Sourcerer. Once done, in the Joomla backend, create a new "Custom Module" and manually add your html code. After, below the big textbox, you will see a button below saying "Insert code". O modal will popup allowing you to add your custom code. Simply add your CSS and JS using the <style> and <script> tags.
Option 3 would be to use a pre-built Image Gallery extensions from the Joomla Extensions Directory. There are loads to choose from.
Hope this helps

Editing Source Code in Wordpress

The company I am working with hosts their webpage on Wordpress. They want me to edit some of the code in order to do various things, such as enable a photo container to be a moving slideshow.
Figuring out the javascript and html to achieve the results they desire is not problematic for me. However, I am unsure how to get full access to the Source Code of the site. I have privileged access to the backend of the site but in wordpress when you go to edit it only shows some of the basic html tags while hiding the <div> and <script> tags and code. Is there any way edit the page in its source code format? I don't want to have to go through the simplified and less expressive/less control Wordpress interface, and I don't even know if I can achieve the desired results with it.
If you try and edit individual pages you're approaching the problem in the wrong way. You probably want to be using a plugin or modifying a plug-in to create the slideshow you need. There are many plugins for wordpress that do what you seem to need.
slider-widget is one such pluging
In Wordpress, there are two main parts to the website's front and backend: the core WP files and the theme that is used. (And other important aspect to a WP site is the database, where all content is stored, including text/images entered in the admin backend.)
Core WP files are not to be changed because they get overwritten with each update. What you want to work with is the theme. Look in Appearance>>Themes and see what the active theme is for the site. It will also tell you the name of the folder the theme files are in.
With FTP, go to root/wp-content/themes/your-theme-name. That's the php, html and css source of the displayed part of the site. Uploaded images are in /uploads/, and plugins in /plugins/.
See http://codex.wordpress.org/Theme_Development to get an idea of how themes are built and how to modify them.
See the rest of the docs at WP to see how to work with plugins, add other javascript correctly so it doesn't conflict with WP's included javascripts, etc. All the docs you really need are at wordpress.org

Categories