Magenta Cuda
Forum Replies Created
-
Forum: Plugins
In reply to: [Magic Fields 2 Toolkit] Another anamoly affecting the mt_field shortcodeI have a fix for this problem. It can be downloaded from GitHub.
I have a fix for this problem. It can be downloaded from GitHub.
Forum: Plugins
In reply to: [Magic Fields 2 Toolkit] Another anamoly affecting the mt_field shortcodeThe ticket was rejected as a bug report. I don’t understand why as it really seems like a bug to me. I have re-submitted it as a topic in the support forum. At this point I don’t think the guys at WordPress are going to help me so I will write a workaround. The workaround will also solve the other mt_field problem.
If you can edit the WordPress core file “…/wp-includes/shortcodes.php” then removing the following lines (467-475) from the function shortcode_parse_atts()
// Reject any unclosed HTML elements foreach( $atts as &$value ) { if ( false !== strpos( $value, '<' ) ) { if ( 1 !== preg_match( '/^[^<]*+(?:<[^>]*+>[^<]*+)*+$/', $value ) ) { $value = ''; } } }
will restore the original functionality of shortcode_parse_atts().
Forum: Plugins
In reply to: [Magic Fields 2] Image Media Field Broken (WordPress backend)Hi Hunk,
I tested your fix for the server access problem and it worked for me.
Thanks,
mcForum: Plugins
In reply to: [Magic Fields 2] Image Media Field Broken (WordPress backend)Although it may not be the problem here one problem I have found is that in order to display the thumbnail the server has to directly execute …/wp-content/plugins/magic-fields-2/admin/MF_ImageMedia.php. Unfortunately, some servers are configured not to execute code from …/wp-content. One way to avoid this problem is do this as a WordPress AJAX request, i.e. have …/wp-admin/admin-ajax.php invoke …/wp-content/plugins/magic-fields-2/admin/MF_ImageMedia.php so that PHP runs the code indirectly and not the server directly. I don’t think it is the problem here as the strange (to the user) image URL appears to be the output of this script so the script apparently has run.
Forum: Plugins
In reply to: [Magic Fields 2] Image Media Field Broken (WordPress backend)I have seen multiple reports of problems with Image Media Field from about six months ago. I have been trying to get a handle on this problem since then. I have not been able to duplicate this problem on my system. However, from all the problem descriptions I suspect that the Javascript code used to implement the setting of the image field from Media Library is not working for some environments.
I am highly motivated to solve this problem as Magic Fields 2 is a prerequisite plugin for my plugin and this has caused a problem for one of my users. Since, I cannot duplicate the problem myself I really need the help of a user which has this problem and is willing to provide me with detailed feedback. If you can help me I will do my best to help you solve this problem.
Can you give me the broken URL. (The URL may look strange to you since a raw image is not used but a processed – reduced to thumbnail size – image is used so the URL is the name of a script that would resize the raw image)
When you encountered this problem were you trying to use a pre-existing image in the Media Library or did you upload a new image and try to use that. Can you try the other case and see if makes any difference?
Magic Fields writes to the Javascript console every time you attach an image to an Image Media field. Is there a message like the following in your Javascript console.
mf_use_new_image_gallery():attachment= alien_trespass.jpg
Is there any error message in the Javascript console?
Can you look at your browser network log for a request like the following:
https://localhost:8080/wp/wp-content/plugins/magic-fields-2/thirdparty/phpthumb/phpThumb.php?&w=150&h=120&src=https://localhost:8080/wp/wp-content/uploads/2014/12/alien_trespass.jpg
This is the HTTP request that the Javascript code would generate to load the thumbnail image. Can you check if the src parameter is correct. Is there a 403 Forbidden response?
If you are not a developer and don’t know how to do these things I can teach how as long as you are using either Firefox or Chrome. I apologize if you are a developer and know how to do these things but several previous users have reported this problem and never responded back and it occurs to me that maybe they did not know how to do these things.
Regards,
mcForum: Plugins
In reply to: [Magic Fields 2 Toolkit] Home Page BrokenSince, I only have access to the mangled good earlier versions it seems the whole site may need to be rewritten and moved to another web host. As this plugin only has 30+ users according to www.remarpro.com I think it is easier to support those users individually than to rewrite and move this entire site. Of course this means I will have to stop development of this plugin as there will be no way to document new features but there were only a small number of additional features I had planned anyway.
I have restarted active development of this plugin.
mc Sep 3, 2015
Forum: Plugins
In reply to: [Search Widget and WP REST Server for Toolset Types] Fair WarningI have re-started active development on this plugin.
mc Sep 3, 2015
Forum: Plugins
In reply to: [Magic Fields 2] Image upload field permissionsThis problem may be the same as this.
Forum: Plugins
In reply to: [Magic Fields 2] Image Media Issue – ForbiddenI searched the WordPress source code for the string “You don’t have permission to access” and it doesn’t exists so the error message was returned by the server and not WordPress.
“…/wp-content/plugins/magic-fields-2/admin/MF_ImageMedia.php” is actually a very strange AJAX request. The usual way to do an AJAX request in WordPress is via “…/wp-admin/admin-ajax.php” where admin-ajax.php would invoke the AJAX handler. In other words, it is very strange that an AJAX request would go directly to “…/wp-content”. I would check that your server allows code to be directly executed from “…/wp-content”.
Forum: Plugins
In reply to: [Magic Fields 2] Image Media Issue – ForbiddenCan you try this test? While logged in to your site can you enter
https://coreukdev.staging.wpengine.com/wp-content/plugins/magic-fields-2/admin/MF_ImageMedia.php
directly into your browser’s address bar. If I do this on my server I get the following output.Notice: Undefined index: image_id in C:\WWW\wp\wp-content\plugins\magic-fields-2\admin\MF_ImageMedia.php on line 23 Notice: Undefined index: field_id in C:\WWW\wp\wp-content\plugins\magic-fields-2\admin\MF_ImageMedia.php on line 26 {"image":"http:\/\/localhost:8080\/wp\/wp-content\/plugins\/magic-fields-2\/thirdparty\/phpthumb\/phpThumb.php?&w=150&h=120&src=","field_id":"","image_value":"","image_path":null}
Since, in this case there was no form data sent errors were returned but it does show that the server actually ran the MF_ImageMedia.php PHP code. My wp-config.php has “define(‘WP_DEBUG’, true);” so your output maybe different if your wp-config.php is set differently but you should not get “Forbidden” error message if your server actually runs the code. If you get the “Forbidden” error message then I suspect your server is rejecting the HTTP request. There are two ways to get the 403 Forbidden response 1) the server can reject the HTTP request and return the 403 Forbidden response or 2) the server can pass the request to WordPress and WordPress finds something wrong with the request and returns the 403 Forbidden response. Since, some of your other sites work I think the server is rejecting the request.
I ran another test with my wp-config.php with “define(‘WP_DEBUG’, false);” and not logged in and got the following output
{"image":"http:\/\/localhost:8080\/wp\/wp-content\/plugins\/magic-fields-2\/thirdparty\/phpthumb\/phpThumb.php?&w=150&h=120&src=","field_id":"","image_value":"","image_path":null}
which is what the code would generate with no form data. However, when I try
https://coreukdev.staging.wpengine.com/wp-content/plugins/magic-fields-2/admin/MF_ImageMedia.php
in my browser I get the following output
Forbidden You don't have permission to access /wp-content/plugins/magic-fields-2/admin/MF_ImageMedia.php on this server.
Forum: Plugins
In reply to: [Magic Fields 2] Image Media Issue – ForbiddenFor Firefox in the Network log click on the row of MF_ImageMedia.php then in the right pane click on Params.
For Chrome in the Network log click on the row of MF_ImageMedia.php then in the right pane click on Headers and scroll down.
For IE I don’t know but probably somewhat similar.
Forum: Plugins
In reply to: [Magic Fields 2] Image Media Issue – Forbidden“I did however use a migrate tool?” – Your problem may actually be a server configuration problem and not a Magic Field 2 problem. Does your server allow access to “https://coreukdev.staging.wpengine.com/wp-content/plugins/magic-fields-2/admin/MF_ImageMedia.php”?