Forum Replies Created

Viewing 15 replies - 1 through 15 (of 164 total)
  • Plugin Author kontur

    (@kontur)

    Thanks for the report! I will need to test with latest versions of PHP, but this sounds like a new syntax warning introduced with an PHP update. You should be able to “hide” those warnings if you set your error logging level higher than “E_WARNING” (https://www.php.net/manual/en/function.error-reporting.php) – you might be able to set this in you wp-config.php or even through your hosting settings. But eventually and better is that this should be addressed in the next plugin update 😉

    Plugin Author kontur

    (@kontur)

    Hey,
    it’s not unlikely something else that changed implicitly broke something that now prevents Fontsampler from rendering correctly.

    When I view the page the fonts seem to get loaded in the browser and the Fontsampler initializes okay. The only error I can see in the developer console, and this might or might not have anything to do with this, is this:

    Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://googleads.g.doubleclick.net/pagead/id. (Reason: CORS request did not succeed).

    It could be that this error prevents Fontsampler from executing after it. Is there any plugins or other code that uses googleads that you could try deactivate and see if that changes the situation?

    What WP and PHP versions are you on? And what version of Fontsampler?

    Plugin Author kontur

    (@kontur)

    Super, thanks for letting me know you got this issue resolved 🙂

    Have fun trying out Fontsampler!

    Plugin Author kontur

    (@kontur)

    Hey,

    since it is a payed theme I would suggest you send them an inquiry asking about the issue with this plugin and link them to the plugin. Feel free to include that they may contact me at hello@johannesneumeier.com for debugging the issue — unfortunately they don’t have their contact details anywhere in their support area.

    Best,
    Johannes

    Plugin Author kontur

    (@kontur)

    Hey,

    thanks for reporting this issue. Could you give me a list of all other installed plugins? Or if you have a test version of your website locally or on a test server, could you try deactivating all other plugins (temporarily) and see if you can then activate Fontsampler?

    Best,
    Johannes

    Plugin Author kontur

    (@kontur)

    Hey,

    the use case for the plugin is really a very different one where you as admin or content creator of a site use the plugin to showcase different fonts. Maybe there is other plugins that allow this kind of customisation of user comments using various fonts.

    Best,
    Johannes

    Plugin Author kontur

    (@kontur)

    Hey there,

    has any of the above suggestions resulted in positive progress? 🙂

    Best,
    J

    Plugin Author kontur

    (@kontur)

    Hey there,

    this forum here is specifically for the Fontsampler plugin. If you have issues particularly with the plugin I am happy to help where I can, but need a more detailed description of what you are trying to achieve and what is not working like you expect 🙂

    Best of luck,
    J

    Plugin Author kontur

    (@kontur)

    Hey, thanks for that info. The PHP version seems no problem, and I’m glad to hear there was no bigger impact.

    So to understand right though, this error comes always when you visit/enable Fontsampler?

    I suspect there is some permission issue or something like that. One thing you could try (if you have FTP access to the site) is that you download Fontsampler 0.4.9 as zip and extract it on your computer. Then via FTP replace the extracted “vendors” folder from the zip to /wp-content/plugins/fontsampler/vendor – this will take a while because there is many unique files. Overwrite the files that are currently on the server.

    Let me know if that helps, please.

    If it does not, I think “re-installing” all of Fontsampler might be our best bet, but before that you should take a database backup.

    Plugin Author kontur

    (@kontur)

    Hey,

    it seems odd that the update would cause any conflict to do with this particular part of the code.

    If your site if completely unresponsive due to this error, you can first of all remove/move the “fontsampler” folder from the /wp-content/plugins folder to get the site running.

    Can you let me know what version of PHP your site is using before doing anything else beyond the above?

    Secondly I am wondering if this could be an issue with file permissions somehow. The error code above basically says a certain function cannot be found, but I can see the the latest version of the plugin definitely ships the file that contains that function (/wp-content/plugins/fontsampler/vendor/twig/twig/lib/Twig/SimpleFunction.php).

    Take a backup of the Fontsampler database tables (or better yet your entire site database) and try reinstalling the plugin fresh, or confirm with your host that the files of the plugin are readable to the webserver.

    Plugin Author kontur

    (@kontur)

    Hey there,

    pretty good detective work 😉

    I added the “fontsamplerSetup()” at one point specifically for this use with AJAX driven sites. That method will check and not re-initialize any fontsamplers that are already initialized, so you should be able to call it whenever the shortcode html has loaded into the DOM (how that event is triggered depends on your theme and what events it exposes for you to interface with). You can use the “fontsampler.events.init” and the CSS classes on the wrapper element itself to interact with the Fontsampler and show/hide it depending on status.

    Best,
    Johannes

    Plugin Author kontur

    (@kontur)

    Hey,

    thanks for sending me the link to test.

    The “Font name” is intended as a actual display font name, like you would pick it in a font selection Dropdown. I see you’ve used it as a description for your use of said font (nothing wrong with that), but possibly the number or words and particularly the use of non-alphabetic signs like punctionation (commas in the name) cause problems. The plugin really should check for this to avoid this, but would you go to your Fontsampler Fontsets and files and edit the font names, e.g. rename them to single word entries, or name them like the files are called, without the file extension or any dots, commas, etc.

    Plugin Author kontur

    (@kontur)

    Hey,

    you can try add this code to the page on which you want the dropdowns to be in sync.

    <script>
    jQuery(function ($) {
    	$("body").on("fontsampler.event.activatefont", ".fontsampler-wrapper", function () {
    		var selectedFontIndex = $(this).find(".font-lister option:selected").index(),
    			$otherSelects = $(".fontsampler-wrapper").not(this).find(".font-lister select")
    
    		$otherSelects.each(function () {
    			// Only change if the selected font is not the one we want
    			if ($(this).val() != selectedFontIndex) {
    				$(this).val(selectedFontIndex)
    
    				// Create and trigger a native 'change' event so the selectric 
    				// plugin will change the dropdown
    				var evt = document.createEvent('HTMLEvents');
    		        evt.initEvent("change", true, true);
    		        $(this)[0].dispatchEvent(evt);
    		    }
    		})
    	})
    })
    </script>

    For the gap, try adding this CSS to your page:

    This will hide the “hidden” dropdown of your first Fontsampler, notice the id

    .fontsampler-id-1 .fontsampler-ui-block-fontpicker { 
       display: none;
    }
    

    This will decrease the space around the text inputs of all Fontsamplers:

    .current-font {
        margin-bottom: 0 !important;
    }

    Hope this helps 😉

    Plugin Author kontur

    (@kontur)

    Hey,

    do you have a sample page online somewhere so I can follow along a bit more easily? Hard to say without seeing what’s happening 🙂

    What do you mean with the “unexpected blank row gap”?

    Why do you need to change the hidden font sampler selectors? Or are you trying to use that to switch the fonts loaded in those other samplers? You could use jQuery’s .trigger(‘change’) on those selects.

    Cheers,
    Johannes

    Plugin Author kontur

    (@kontur)

    Hey there,

    thanks for your feedback and reporting this issue. It’s something that has been requested before, and is on the list of things I would like to add to the plugin, eventually.

    You could add some custom javascript to overwrite the initial font size after the fontsamplers load when the screen size is below a certain size, but this is fairly technical. I appreciate that there needs to be a more easily customisable way to do this.

    Best,
    Johannes

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