Viewing 15 replies - 1 through 15 (of 15 total)
  • Plugin Author Jacob N. Breetvelt

    (@opajaap)

    The general or the photo only generator, or both, and what editor do you use?
    The Gutenberg editor in classic mode has the bug that my icons show up but do nothing.

    Thread Starter FGBmaster

    (@fgbmaster)

    Gutenberg is disabled, Classic Editor plugin enabled. It’s the general generator (icon with Asterisk).

    Plugin Author Jacob N. Breetvelt

    (@opajaap)

    Thread Starter FGBmaster

    (@fgbmaster)

    And this is, what I get: https://fotogruppe-bredenbeck.de/ShortcodeGenerator.PNG.
    Btw: WPPA+ API Version: 7.3.08.006

    Plugin Author Jacob N. Breetvelt

    (@opajaap)

    Are there (js) errors on the console?

    Thread Starter FGBmaster

    (@fgbmaster)

    No errors in Firefox or Chrome.

    Hi @fgbmaster
    I just had the same problem. Turned out there was a conflict with another active shortcode generator, called “Shortcodes Indep”. I simply disabled it and the WPPA+ generator worked again.
    I recommand to simply deactivate your plugins one by one and see what happens.
    Hope that helps

    Thread Starter FGBmaster

    (@fgbmaster)

    Hi @liko,
    thanks for your response.
    I have no plugin like Shortcode Indep, but deactivated every plugin (except jetpack) regardless. No success. ??
    I will try to find a solution on my localhost this evening.

    • This reply was modified 4 years, 7 months ago by FGBmaster.

    When you “inspect” the page, can you see a:
    <div id=”TB_overlay” class=”TB_overlayBG”></div>
    into which you might be able to dig further?

    Thread Starter FGBmaster

    (@fgbmaster)

    This is what i figured out on my localhost (WINDOWS):
    All went well with
    PHP 7.1.32 | WP 5.3 | WPPA 7.2.14
    PHP 7.1.32 | WP 5.3 | WPPA 7.3.10
    PHP 7.1.32 | WP 5.4 | WPPA 7.3.10
    No meore success with
    PHP 7.3.16 | WP 5.4 | WPPA 7.3.10
    PHP 7.4.4 | WP 5.4 | WPPA 7.3.10
    No errors php | js
    No plugins except WPPA and classic editor

    When loading the new post page, two ajax calls are made. The second one is:

    https://localhost/fgb/wp-admin/admin-ajax.php?action=wppa&wppa-action=tinymcedialog
    Status is 200 OK, Answer is empty

    After all the called WPPA script seems to return nothing or an empty string or null.
    Next I dived into wppa-ajax.php
    Line 864 calls htmlentities($result) and this function returns an empty string.
    If I call htmlentities($result, ENT_IGNORE), all is fine and the dialog is filled!

    But ENT_IGNORE is discouraged because of security issues …

    Next I changed the blog language to english and no problem occured.

    So the problem must be result of the german translation. There are some ?, ?, ü inside …
    var_dump(mb_detect_encoding($result, "UTF-8, ISO-8859-1", true)) returns string(10) "ISO-8859-1", but If I call htmlentities($result, "ISO-8859-1") the ? is shown as ?¤, a typically issue with wrong charset.

    At last I inspected the file wppa-tinymce-shortcodes.php where wppa_make_tinymce_dialog() lives and saved it with no changes but encoding UTF-8.

    That’s it!

    Brilliant sleuthing. Touch forelock!
    ??

    Thread Starter FGBmaster

    (@fgbmaster)

    To make it short: this solution did not work on my linux machine, because wppa-tinymce-shortcodes.php is already saved with encoding utf-8 ?? and returns ISO-8859-1 anyway.

    I checked the output step by step and figured out:

    line 505 //'';return var_dump(mb_detect_encoding($result, "UTF-8, ISO-8859-1", true));  // returns UTF-8 :-) 
        $result .=     '<option' .
                           ' value="' . $value . '"' .
                       ' >' .
                           $name .
                           ' (' . wppa_get_album_name( $photo['album'] ) . ')' .
                       '</option>';
    
                                }
    line 513 return var_dump(mb_detect_encoding($result, "UTF-8, ISO-8859-1", true));    // returns ISO-8859-1 :-(

    Does the function wppa_get_album_name( $photo['album'] ) return an ISO-string?

    @opajaap Jacob, I know there where issues with names of photos and/or albums with danish or swedish letters inside. Do you convert them e.g. by using utf8_decode() or utf8_encode? That will cause problems, when the input string is already utf8. Or another file involved is stored with encoding ISO-8859-1. Or a WP function returns an ISO by default. This is hard to find…

    Any idea about this?

    • This reply was modified 4 years, 7 months ago by FGBmaster.
    Thread Starter FGBmaster

    (@fgbmaster)

    Today i changed the translation of Please select a display type (wppa-tinymce-shortcodes.php:148) from bitte w?hle ... to bitte w&auml;hle ... and it seems to work.
    btw: think there is no problem with 3 found utf8_encode() function calls.

    Thread Starter FGBmaster

    (@fgbmaster)

    I changed the code from my penultimate post so that it converts to UTF8 if necessary.

    @opajaap Sent you the file by email.

    Plugin Author Jacob N. Breetvelt

    (@opajaap)

    Thanx for line 505 etc. I will put it unchanged in the next release.

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘WPPA+ Shortcode Generator’ is closed to new replies.