jkovis
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Some how my got hacked but only shows wrong in google search engineThis looks like an SEO hack. The spam content will only be visible if your browser’s user agent matches a search engine crawler’s user agent.
I’d find a browser plugin that will spoof your browser’s user agent so you can see it for yourself and then contact a developer to investigate the hack.
Forum: Fixing WordPress
In reply to: Only Internal Access to Site – No external accessIt looks like the site url and home url options were saved with your server’s local IP address instead of the domain you want to use.
What happens when you try adding the following to your wp-config.php file?
define( 'WP_SITEURL', 'https://zstream.chickenkiller.com' ); define( 'WP_HOME', 'https://zstream.chickenkiller.com' );
Forum: Developing with WordPress
In reply to: Send file using wp_safe_remote_postWhat happens if you try calling wp_remote_post() instead of wp_safe_remote_post()?
wp_safe_remote_post() calls wp_http_validate_url() which might be rejecting the URL.
Forum: Developing with WordPress
In reply to: How to create a post meta key / value pageI would suggest looking into using a custom taxonomy instead of post_meta. You can limit it certain post types and you will automatically get taxonomy archive pages (i.e. example.com/label/label-name/) and the database queries are much more efficient that doing meta queries.
- This reply was modified 7 years, 7 months ago by jkovis.
Forum: Developing with WordPress
In reply to: wordpress wp_ajax_[ACTION] display a broken imageCan you confirm that you’re running the code in the same environment/server as the non-wp_ajax version? When I tried your code I had to install GD to get it to work, but it sounds like that’s not the issue since you had it working before.
What do the admin-ajax.php response headers look like? Is the Content-type header sent as image/png?
Lastly, you might want to start adding some error_log() calls like this to your ws_resize_img function in order to try and narrow down where it’s breaking:
$log = print_r( array( 'file' => __FILE__ . ' on line ' . __LINE__, 'src' => isset( $_GET['src'] ) && ! empty( $_GET['src'] ) ? urldecode( $_GET['src'] ) : 'not set/empty', 'arr' => $arr, 'ext' => $ext, 'image' => $image ), true ); error_log( $log );
I hope that helps and am interested to learn what’s causing the problem.
Forum: Developing with WordPress
In reply to: wordpress wp_ajax_[ACTION] display a broken imageI have a feeling that your wp_ajax actions are not being added/fired…where are your
add_action( 'wp_ajax_
code andws_resize_img
function located?When I tested your code I received a 300×300 png image using a larger jpg source file. To do so I put your code into my theme’s functions.php file which is always included in every WordPress request. You might want to make sure your code is there or in its own plugin.
Forum: Fixing WordPress
In reply to: link is being stripped, how to stop?Depending a the user’s permissions, WordPress will whitelist certain html elements and attributes and then remove those elements/attributes not found in the whitelist before it saves to the database.
To add a “data-timestamp” attribute to an anchor (link) tag try adding this code to your theme’s functions.php:
function add_data_timestamp_attribute_to_anchor( $tags, $context ) { if ( 'post' !== $context && ! in_array( 'post', $context ) ) { return $tags; } $tags['a']['data-timestamp'] = true; return $tags; } add_filter( 'wp_kses_allowed_html', 'add_data_timestamp_attribute_to_anchor', 10, 2 );
PS To have your code appear as text you need to surround the code with a “backtick” mark on each side (press the
code
button on top of the textarea to add one automatically).Forum: Fixing WordPress
In reply to: Upload HTTP Error (detailed)That is strange and I’m not sure what else I could suggest to try to narrow down the cause. Sorry I couldn’t be of more help, but best of luck.
Forum: Fixing WordPress
In reply to: Upload HTTP Error (detailed)Thank you for the additional information, to answer your question
Do GD and ImageMagick conflict when jpg support is enabled on both modules?
– My understanding is that WordPress will test for a set of ImageMagick functions it needs and if they’re not present then use GD. Everything you’re running is new enough that I don’t see that as being the cause of the problem.
If you haven’t already, you can try disabling all plugins and if uploading then works start enabling them one by one to see which one is causing the conflict.
Next, I’d recommend you add the following code to the top of your wp-config.php file, try uploading a couple more times, and then examine wp-content/debug.log to see if WordPress logs any errors to that file:
define( 'WP_DEBUG', true ); define( 'WP_DEBUG_LOG', true );
Finally if that doesn’t work, you can also try to debug the upload script itself (wp-admin/async-upload.php) by adding code the following, trying an upload, and then checking wp-content/debug.log to see if any errors are being thrown:
$log = print_r( array( 'file' => __FILE__ . 'on line ' . __LINE__, 'request' => $_REQUEST, 'foo' => $bar ), true ); error_log( $log );
Forum: Fixing WordPress
In reply to: Upload HTTP Error (detailed)shoot, I was afraid that was the error message since it seems to be a catch-all error that isn’t easy to debug.
A few ideas:
– Do you get the same error if you attempt to upload a pdf? If no, looking at your phpinfo() page again, is GD or Imagick installed and enabled?
– Do you get the same error if you use the “browser uploader” (/wp-admin/media-new.php?browser-uploader) as well?
– if you recently installed or upgraded WordPress it might be worth a try to re-install the WordPress core files (everything except wp-content) in case there was a problem with the install/upgrade.
– Does the response from the upload’s ajax request (use your browser’s developer tools i.e. chrome’s) give a clue of what is causing the error?
Forum: Fixing WordPress
In reply to: Upload HTTP Error (detailed)Sorry if I’m missing something, but what is the exact error message that you’re seeing?
Also, what is the size of the file you’re trying to upload and what are the values in your phpinfo() page for
upload_max_filesize
andpost_max_size
?Forum: Fixing WordPress
In reply to: How to archive a WP site?I’d try using the “Preload” feature in the WP- Super Cache plugin to generate static html files, but you would need to make sure that any needed css/js files enqueued by WordPress, the theme, or plugins are still accessible.
Forum: Fixing WordPress
In reply to: Google and Custom Post TypesCan you list and describe the different post types and associated taxonomies?
Also, have you added your site to Google Webmaster Tools?
Lastly, I would look at different XML Sitemap plugins since your site’s current sitemap doesn’t seem to match up with your site structure.
Forum: Networking WordPress
In reply to: Multisite – Change Upload Max Limit Per Sitewhere exactly, in what file, would I make that change?
— It would probably be easiest to create a new “must use” plugin (any php file inside wp-content/mu-plugins/ would work).
Forum: Fixing WordPress
In reply to: Website Working but Admin Panel BlankDo you have access to your website’s error log? If not you will want to contact your host for access to it since it will probably have the filename and line number causing the problem.
If you can’t get the error log then I would suggest renaming your theme’s functions.php file to see if that is causing the issue. If that is the cause then you can rename it back and selectively comment out code to try and narrow down where the issue is.