gkhairallah
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Please Help, Homepage Featured Images Won't DisplayHey guys, sorry to hijack this thread, I figured @bgd221 is having this same exact problem, so perhaps we can both benefit from a solution.
I’m seeing the same thing, I updated yesterday to 3.5.1, and I’m not sure what happened, but the thumbnails disappeared. I checked with support from my theme provider team (elegant themes), and they pointed me to this: https://www.agentwp.com/fix-thumbnails-not-working-in-a-wordpress-theme-from-elegant-themes
Which I followed, and the only change that I’m thinking may have affected things, is that I went to Media Settings, and I change the path from the full absolute path (home1/username/public_html/blog/wp-content/uploads to just wp-content/uploads. Of course, when I clicked save, that whole option disappeared altogether.However, here’s the interesting part. When I go to my blog (which is at https://blog.foreignkid.net), the thumbnails are missing. If I look at the source location of the thumbnails, I can see that it’s something like this:
When I click on that link, I get page not found. However, if I navigate to one level up. That is:
https://blog.foreignkid.net/wp-content/uploads/et_temp and then click on that file, the image displays without any problems.
This seems to be happening to all images.
I checked the permissions on those images, and some of them are 755 and others are 644. that could be because I had set perms to 755 on wp-content/uploads (chmod -R 755 uploads), however, in that case, I would’ve expected all images to have these permissions.In any case, the behavior is still pretty curious regardless.
Any thoughts as to what may be going on, and how to fix this?
Is this theme related? WordPress 3.5.1 related? …
Any help would be greatly appreciated!Oops. Thanks for the heads up Matt. I fixed the typo ??
Excellent. Thank you very much Matt. I actually had to make additional changes to refer to the plugin in question, and also, I realized that the only reason it was happening, was because I wasn’t supposed to implement the original change you suggested along with the AI2EC plugin. So I undid the original one, and modified this one, and now it’s all working.
Below is the code that now works out-of-the-box with the Service-Status plugin.
<?php /* Plugin Name: Service Status Filters & Notification Override Plugin URI: https://subscribe2.wordpress.com Description: Adds Service Status custom post type and taxonomy to Subscribe2, and enables notification override box on event authoring pages. Version: 1.0 Author: Matthew Robinson / modified by Georges Khairallah */ // Allows Subscribe2 to recognize and publish // the service status custom post types. function my_post_types($types) { $types[] = 'service-status'; return $types; } add_filter('s2_post_types','my_post_types'); function my_taxonomy_types($taxonomies) { $taxonomies[] = 'products'; $taxonomiez[] = 'service-status'; return $taxonomies; } add_filter('s2_taxonomies','my_taxonomy_types'); // Adds the "Subscribe2 Notification Override" button to each // systemstatus custom post type authoring page. function my_meta_types() { global $mysubscribe2; add_meta_box('subscribe2', 'Subscribe2 Notification Override', array(&$mysubscribe2, 's2_meta_box'), 'service-status','advanced'); } add_action('admin_menu', 'my_meta_types'); ?>
Thanks again for your help,
Much appreciated!!
Excellent @mattyrob. That did it. the only thing that’s still missing, which I suspect you figured was going to be my next question, and that is the Subscribe2 Notification Override section.
Again, I did my research, and found a standalone plugin you wrote for the AI1EC Subscribe2 plugin, though it looks like this was specifically written for the AI1EC plugin, so when I try to activate the plugin I get this:Fatal error: Cannot redeclare my_post_types() (previously declared in /opt/wordpress/wp-content/plugins/service-status/includes/service-status.class.php:132) in /opt/wordpress/wp-content/plugins/AI1EC-Subscribe2/my_post_types.php on line 16
(which I guess, is to be expected).
Is there a way to modify that plugin to work with the status-update plugin? or even just modify the PHP code on the Subscribe2 plugin to make that section show up?
Either method would work, which ever is easier…
Thanks again for your help. you’re awesome!
Just so I’m not asking the question and not doing any work … ?? .. I tried to look up some info. and I found 2 piece of information that may be helpful.
In my Service Status plugin, there is a “service-status.class.php”, in which I found this code:public function init() { $this->register_post_type(); $this->register_taxonomy(); } public function admin_init() { add_meta_box("service-status-meta", "Status", array( &$this, 'post_status' ), $this->options->post_type, "side", "low"); } private function register_post_type() { $supports = array('title','editor'); if( $this->options->comments ) { array_push( $supports, 'comments' ); } register_post_type( $this->options->post_type, array( 'labels'=> array( 'name'=>__('Service Status'), 'singular_name'=> __('Service Status update'), 'add_new_item'=>__('Add new service status update'), 'edit_item' => __('Edit status update'), ), 'public'=>true, 'has_archive'=>true, 'rewrite'=>array( 'slug'=>$this->options->slug, 'with_front'=>false, ), 'exclude_from_search'=>true, 'supports'=> $supports ) ); }
Also, I looked up some info about integrating subscribe2 into the custom post types, and I found this: https://subscribe2.wordpress.com/2011/02/28/subscribe2-and-custom-post-types/
and an example of adding code:
function my_post_types($types) { $types[] = 'my_post_type'; return $types; } add_filter('s2_post_types', 'my_post_types');
At this point though, I’m not sure sure what changes to make in this example, and where to place this code. I figure with these 2 additional details, someone with more php and WP codex knowledge could easily help with this.
Thanks again,
Forum: Fixing WordPress
In reply to: Code injection problemHey Duck – boy, thanks for the reply!
So, in response to your suggestions:
The first thing I had actually done was to change all my passwords. I changed database, PHPMyAdmin, CPanel, as well and all my wordpress admin accounts.
As I had mentioned, My commenting system is through Google Friend Connect, and unfortunately, last night, I discovered that GFC is being retired, well… today ! ?? but I was suspicious on whether one of those accounts (who only have a subscriber role), can be the ones compromising the site? not sure how I’d know. I was looking to see if I can just disable all those accounts, but the only option in WP is to delete them, which I didn’t rush to go and do ??Regarding the .htaccess. It’s been recreated, in fact, I have a sync job that runs now when it detects the .htaccess changed. (that’s my work around for now, until I resolve the problem). As for changing the site to 744. I noticed that all my files are already 744, my DIRS are 755 though. So you’re telling me to run a chmod 744 -R * on the root of my wordpress dir? is it easy to revert those back later? I would assume to revert back, I’d have to go back to the directories only, and change those to 755 , while leaving all the rest of the files at 744 (as they are right now anyway)
wp_options
table is unchanged at least as far as thesiteurl
andhome
fields go. I had checked this as I was migrating my to the new host.So, at least so far, it looks like I have already tried everything you suggested (minus the chmod). By the way, did I mention that the injected code is chmoding 444 .htaccess every time it changes it? it’s driving me bananas!
Now regarding the plugins. I have tried a couple of things, and maybe you can tell me if my attempt is enough to rule those out.
Just yesterday I moved hosts, and decided to move every manually, so that I can put the component back one at a time. Initially, I just installed a new clean version of WP, and kept the plugins/uploads/themes folder in a temporary directory outside the WP instance. yet the issue still happened. I had tried to change the themes, so that the active one is not the custom one, and the issue still happened. So.. would that rule out the fact that the plugins directory is where the problem lies?Now if it comes down to dealing having to dissect the code, is there something in particular I need to be looking for? I, more or less can understand the PHP code, though I’m not familiar with the wordpress codex, at least not to a point where I can tell a real one from a fake one. I’ve also found some weird obfuscated javascript before, and that’s very easy to find. But I suspect injected code is much harder, as it would look like normal code within one of the php files?
I was hoping that the behavior I described (clicking on a link) would perhaps help you give me pointers as to which files may contain the injection.Also, you haven’t mentioned anything in that’s in SQL. you don’t think the injection can be in there at all? (by looking at the behavior, it doesn’t seem like it’s an SQL injection, but just thought I’d bring it up anyway) .
Again, thank you very much for your willingness to assist.
p.s: sorry for the long post.Forum: Plugins
In reply to: Error with Akismet – Invalid KeyAah. I see.. gotcha. thank you much HandySolo!
Forum: Plugins
In reply to: Error with Akismet – Invalid KeyHey guys, maybe I’m missing something here, but everywhere I read about getting an API key, I saw that it was from wordpress.com.
I’m running www.remarpro.com, and don’t use a wordpress.com account. does anyone know of a way to acquire a key from my own wordpress installation on my own server?Thanks for the help!
Forum: Fixing WordPress
In reply to: Quote in filename broke javascript for upload… FIX?Sorry for the late reply. I forgot to check it, and also forgot that there’s no email notifications on this forum. anway, warrisr. Thanks for the tip. I went ahead and changed the name in the sql db, and things seem to work. does anyone have any idea whether this bug has been fixed in 2.0.1?
Forum: Fixing WordPress
In reply to: Quote in filename broke javascript for upload… FIX?anybody around to help me resolve my problem? ??