Title: WPPA+ Shortcode Generator
Last modified: March 23, 2020

---

# WPPA+ Shortcode Generator

 *  [FGBmaster](https://wordpress.org/support/users/fgbmaster/)
 * (@fgbmaster)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/wppa-shortcode-generator/)
 * WPPA+ Shortcode Generator screen (tinymce) has no elements.

Viewing 15 replies - 1 through 15 (of 15 total)

 *  Plugin Author [Jacob N. Breetvelt](https://wordpress.org/support/users/opajaap/)
 * (@opajaap)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/wppa-shortcode-generator/#post-12577388)
 * 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](https://wordpress.org/support/users/fgbmaster/)
 * (@fgbmaster)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/wppa-shortcode-generator/#post-12577706)
 * Gutenberg is disabled, Classic Editor plugin enabled. It’s the general generator(
   icon with Asterisk).
 *  Plugin Author [Jacob N. Breetvelt](https://wordpress.org/support/users/opajaap/)
 * (@opajaap)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/wppa-shortcode-generator/#post-12578002)
 * This is what i see:
    [https://betatest.opajaap.nl/wp-content/uploads/Shortcode-generator.PNG](https://betatest.opajaap.nl/wp-content/uploads/Shortcode-generator.PNG)
 *  Thread Starter [FGBmaster](https://wordpress.org/support/users/fgbmaster/)
 * (@fgbmaster)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/wppa-shortcode-generator/#post-12578143)
 * And this is, what I get: [http://fotogruppe-bredenbeck.de/ShortcodeGenerator.PNG](http://fotogruppe-bredenbeck.de/ShortcodeGenerator.PNG).
   
   Btw: WPPA+ API Version: 7.3.08.006
 *  Plugin Author [Jacob N. Breetvelt](https://wordpress.org/support/users/opajaap/)
 * (@opajaap)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/wppa-shortcode-generator/#post-12581580)
 * Are there (js) errors on the console?
 *  Thread Starter [FGBmaster](https://wordpress.org/support/users/fgbmaster/)
 * (@fgbmaster)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/wppa-shortcode-generator/#post-12582536)
 * No errors in Firefox or Chrome.
 *  [liko](https://wordpress.org/support/users/liko/)
 * (@liko)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/wppa-shortcode-generator/#post-12648558)
 * Hi [@fgbmaster](https://wordpress.org/support/users/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](https://wordpress.org/support/users/fgbmaster/)
 * (@fgbmaster)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/wppa-shortcode-generator/#post-12651232)
 * Hi [@liko](https://wordpress.org/support/users/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 6 years, 2 months ago by [FGBmaster](https://wordpress.org/support/users/fgbmaster/).
 *  [Serge](https://wordpress.org/support/users/serge-wp/)
 * (@serge-wp)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/wppa-shortcode-generator/#post-12651599)
 * 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](https://wordpress.org/support/users/fgbmaster/)
 * (@fgbmaster)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/wppa-shortcode-generator/#post-12657587)
 * 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:
 *     ```
       http://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!
 *  [Serge](https://wordpress.org/support/users/serge-wp/)
 * (@serge-wp)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/wppa-shortcode-generator/#post-12657999)
 * Brilliant sleuthing. Touch forelock!
    🙂
 *  Thread Starter [FGBmaster](https://wordpress.org/support/users/fgbmaster/)
 * (@fgbmaster)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/wppa-shortcode-generator/#post-12658838)
 * 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](https://wordpress.org/support/users/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 6 years, 1 month ago by [FGBmaster](https://wordpress.org/support/users/fgbmaster/).
 *  Thread Starter [FGBmaster](https://wordpress.org/support/users/fgbmaster/)
 * (@fgbmaster)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/wppa-shortcode-generator/#post-12668833)
 * 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](https://wordpress.org/support/users/fgbmaster/)
 * (@fgbmaster)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/wppa-shortcode-generator/#post-12674860)
 * I changed the code from my penultimate post so that it converts to UTF8 if necessary.
 * [@opajaap](https://wordpress.org/support/users/opajaap/) Sent you the file by
   email.
 *  Plugin Author [Jacob N. Breetvelt](https://wordpress.org/support/users/opajaap/)
 * (@opajaap)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/wppa-shortcode-generator/#post-12676568)
 * 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.

 * ![](https://s.w.org/plugins/geopattern-icon/wp-photo-album-plus.svg)
 * [WP Photo Album Plus](https://wordpress.org/plugins/wp-photo-album-plus/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-photo-album-plus/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-photo-album-plus/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-photo-album-plus/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-photo-album-plus/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-photo-album-plus/reviews/)

 * 15 replies
 * 4 participants
 * Last reply from: [Jacob N. Breetvelt](https://wordpress.org/support/users/opajaap/)
 * Last activity: [6 years, 1 month ago](https://wordpress.org/support/topic/wppa-shortcode-generator/#post-12676568)
 * Status: not a support question