Viewing 9 replies - 1 through 9 (of 9 total)
  • Thread Starter desean

    (@desean)

    isn’t there someone who has the same problem as me?

    Hi Desean. I just got your comment at the blog. I’ll try to look at this tonight when I get home from work…

    Could you post your current WP version (you said latest, but that could mean several things) and what plugins you have installed?

    At first glance, it appears that “sanitize” is a function in:
    /wp-includes/js/tinymce/plugins/spellchecker/tinyspell.php

    This feature is installed as part of the base WP package (even though it is in the plugin folder). Do you have the file listed above? It looks like WP may not be finding that code any more.

    You mentioned editing your path, this could be an issue here. I’m not an expert on how WP resolves function paths in concert with php.

    I took another look and didn’t see anything obvious that would cause this… other than a path problem.

    Any additional info?

    I’m having the same issue. All I did was download and activate the plugin.

    Error: Fatal error: Call to undefined function sanitize() in /home/eeee/public_html/wordpress/wp-content/plugins/gallery2-image-block-widget/Gallery2_ImageBlock.php on line 109

    Thread Starter desean

    (@desean)

    sorry for my late reply. was busy so didn’t check for quite a while.

    i was using version 2.6.2 then. now using 2.6.3 and the problem still exist

    when i mentioned editing my path, i meant the path mentioned in your installation note: “Configure the Gallery2 URL option to match your Gallery install. Do not include main.php or the trailing slash.”

    My gallery URL is https://www.dragonscouts.com/gallery

    just so you know, the error occurs in the dashboard under Design > Widgets section (see screenshot: https://bayimg.com/malfhaabN )

    I had thought the function “sanitize” belongs to Gallery instead of wordpress. I did a search for “function sanitize” in all my wordpress (exclude plugins) and gallery2 files and the result is as follows:

    gallery2\install\InstallStep.class
    function sanitize($string)
    gallery2\modules\core\classes\GalleryUtilities.class
    function sanitizeInputValues(&$value, $adaptForMagicQuotes=true)
    gallery2\modules\search\classes\SearchUtilities.class
    function sanitizeSearchCriteria($string)
    gallery2\upgrade\UpgradeStep.class
    function sanitize($string)
    wordpress\wp-includes\bookmark.php
    function sanitize_bookmark($bookmark, $context = 'display')
    function sanitize_bookmark_field($field, $value, $bookmark_id, $context)
    wordpress\wp-includes\category.php
    function sanitize_category($category, $context = 'display')
    function sanitize_category_field($field, $value, $cat_id, $context)
    wordpress\wp-includes\comment.php
    function sanitize_comment_cookies()
    wordpress\wp-includes\formatting.php
    function sanitize_file_name( $name ) { // Like sanitize_title, but with periods
    function sanitize_user( $username, $strict = false ) {
    function sanitize_title($title, $fallback_title = '') {
    function sanitize_title_with_dashes($title) {
    function sanitize_sql_orderby( $orderby ){
    function sanitize_email($email) {
    function sanitize_url( $url, $protocols = null ) {
    function sanitize_option($option, $value) { // Remember to call stripslashes!
    wordpress\wp-includes\post.php
    function sanitize_post($post, $context = 'display') {
    function sanitize_post_field($field, $value, $post_id, $context) {
    wordpress\wp-includes\taxonomy.php
    function sanitize_term($term, $taxonomy, $context = 'display') {
    function sanitize_term_field($field, $value, $term_id, $taxonomy, $context) {

    it seems that wordpress do not have the sanitize() function. gallery2 have but they are in “install\InstallStep.class” & “upgrade\UpgradeStep.class” files. I don’t think gallery2 use these 2 files except during installtion.

    by the way, i have the following activated plugins (fyi, i have deactivated all plugins except this and still got the same error):
    AdSense Manager
    Akismet
    All in One SEO Pack
    AskApache Google 404
    AskApache Password Protect
    cforms
    External Gallery2 Image Block Plugin
    Google Analyticator
    Google XML Sitemaps
    Lightbox 2 Plugin
    Post Tabs
    Subscribe To Comments
    Wordpress Automatic Upgrade
    WP-EMail
    WP-EMail Widget
    WP-FLV
    WP-PageNavi
    WP-Print
    WP Security Scan
    Yet Another Related Posts Plugin

    Thread Starter desean

    (@desean)

    btw to fix this issue currently, i have replaced all sanitize() functions with sanitize_title_with_dashes() in Gallery2_ImageBlock.php

    i don’t know if sanitize_title_with_dashes() is the correct function to use but at least your plugin is working for me right now.

    please let me know what you discover with my above inputs.

    anyway thanks for this plugin

    bump?

    bump … fails and takes down wdiget page.

    G2 ImageBlock

    Fatal error: Call to undefined function sanitize() in /usr/home/example/public_html/wp-content/plugins/gallery2-image-block-widget/Gallery2_ImageBlock.php on line 217

    I guess the “watch favorites” feature doesn’t actually work so well. Apologies for the perceived abandonment of this thread.

    The root cause of this issue turns out to be that the “sanitize” function is present on some installations (like mine) only as part of another plugin. OOPS!

    I’ve created a local “sanitize_key_names” function to resolve this issue.

    Version 0.1.5 is now winging its way into the repository with this fix.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘[Plugin: External Gallery2 Image Block Plugin] Call to undefined function sanitize()’ is closed to new replies.