jayque9
Forum Replies Created
-
Forum: Plugins
In reply to: [WooCommerce] Refund showing as processed twiceDitto on this one. I just had a client with the exact same problem. One entry about a refund for stripe, and a second entry that included the reason for refund. It totaled the two entries at the bottom of the page as doubled, but Stripe showed the correct refund only once.
I had a similar problem with woocommerce products addons for a client. To get it working again I had to downgrade woocommerce product addons to version 3.0.13. There appears to be a problem with woocommerce product addons version 3.0.15. I did not try 3.0.14, since the last back up I had where it worked was 3.0.13.
I could see the price calculation change on the single product page just after selecting the end date to exclude the addon price. The price appeared correctly just prior to selecting the date range.
Forum: Plugins
In reply to: [NextCellent Gallery - NextGEN Legacy] fatal errorIt’s because use are using a version of php prior to 5.3. all the widget classes in the widgets folder need to be updated to make it work in php 5.2.
eg in class-ngg-gallery-widget.php the last few lines are:
add_action( ‘widgets_init’, function () {
register_widget( ‘NGG_Gallery_Widget’ );
} );change it to:
add_action(‘widgets_init’, create_function(”, ‘return register_widget( “NGG_Gallery_Widget” );’));
The same change needs to be made in the other two widget classes as well.
I took a quick look at manage-images.php, and noticed that you were now called wp_kses function on the description output. I had to look it up in the codex, to see what this function actually did, and in it’s description it states you have to remove any slashes from the php’s magic quotes before you call this function.
I changed line 507 of manage-images.php from
$img_description = wp_kses($picture->description,$allowedposttags);
to
$img_description = wp_kses( stripslashes($picture->description),$allowedposttags);
This seems to resolve my problem with the multiplying backslash escapes.
Closer. It does not delete hyperlinks that are added as part of the description, but I’m seeing the backslashes that are added to the string when double or single quotes are in the text field.
each time you press the save button additional backslashes are added to escape the content.
for example, the string
he said, “this is a quote”
would be saved as
he said, \”this is a quote\”
upon saving again you get
he said, \\\”this is a quote\\\”
It looks like you are using the sanitize_text_field function on the field output, which strips out all html markup. Is the vulnerability a problem with html injected code, or is this is over kill to clean up other possible script injections?
It seems like you would actually perform the sanitization on the content from the form submission before it is updated in the database, and not on content that has already been inserted.
I’ve got a client that wants to add hyperlinks to their descriptions, which works on the initial tests, but becomes a problem if they update any data in the gallery after that, since the output it stripped on the following edits.
Just saw the same error when developing a new site with the debug option turned on. Edit the plugin file “widget-content.php” and change the admin_scripts function to this:
function admin_scripts() {
if ( defined(‘__DIR__’) ) { // support for php v5.3 and later
wp_enqueue_style( ‘widget-context-admin’, WP_CONTENT_URL . ‘/plugins/’. basename(__DIR__) . ‘/admin-style.css’ );
} else { // support for php prior to v5.3
wp_enqueue_style( ‘widget-context-admin’, WP_CONTENT_URL . ‘/plugins/’. basename(dirname(__FILE__)) . ‘/admin-style.css’ );
}
}This has more to do with the version of php that you are using. __DIR__ was added in php v5.3.0, so if you are still on a server using 5.2, you will see this error pop up. Using dirname(__FILE__) instead for older servers will fix your problem.
It was working for ACF v4.1.4. It appears that a change to the current version (ACF v4.1.6), didn’t like one of the assigned variable names. I’ve updated the code, and tested with the site that I’m using this add-on with, and it appears to be working again.
Try downloading the current update, and see if it will work for you now.
It’s a plugin. You don’t need to add an action in your theme to register the fields.
This zip file needs to go in your plugins folder (/wp-content/plugins/acf-field-nextgen-relationship/), and you will need to activate it in the admin just like any other plugin. The ACF plugin will need to be installed and activated first, as this extends the functionality of ACF.
I haven’t removed the file. I just clicked the link and was able to download the file without a problem.
The file is being downloaded from my public dropbox folder. Does your internet service block bit.ly or dropbox?
This will only work with the v4 of the ACF. There is a way to call a different file if v3 is installed, but didn’t bother with it since I don’t have any sites where I have to run the older version any longer.
Let me know if you find any problems with it. I mainly needed it for relationships to a single gallery. I have not tested it with relationships to albums, or with a multi-select option. I did copy the same code from the original plugin, so it should work.
I’ve used the ACF guides, and one of the free plugins as an example to rewrite the code to make it work with version 4. I haven’t fully tested it yet, since I only needed to make relations to specific galleries, and we are still developing the site.
It seems to work so far. I’ll follow up if the author does not release an updated version.
the nggShowAlbum is a function in in the nextgen plugin. The available parameters to pass (from the nggfunctions.php file):
nggShowAlbum($albumID, $template = ‘extend’, $gallery_template = ”)
so try this in your code:
nggShowAlbum( $nextgen_gallery_id[‘ngg_id’] , ‘dop-thumbnail-gallery’);