Jump to content


  • Posts

  • Joined

  • Last visited

  • Days Won


Posts posted by Macrura

  1. 53 minutes ago, Clarity said:
    Thank you! Finally, I found the root of the problem. I didn't add "return $inputfields;" to the end of file.
    I'm not using a namespace explicitly. ProcessWire version is 3.0.199 dev, and everything works fine now.

    awesome! Thanks for using the module - hope it helps and is useful!

    • Like 1
  2. @Clarity

    Can you post the contents of your PHP file?
    Are you using any namespace?
    What version of ProcessWire are you on?

    There is an example settings file in the module, you can copy to your templates folder somewhere and then specify that file for the settings. If that file doesn't work, then something must have changed in the core. It works for me under PW 3.0.178.

  3. (1) if you are using the textformatter, then you do not need to module init in _init.php

    (2) There is no CSS being output on your page, so the players will not look right

    (3) If everything is automatic, then it should just work, and you shouldn't have to do any code in the header or footer. If you want to use the $config option, then you need to put the foreach for the $config->styles and $config-scripts in the header and footer respectively.

    (4) What does your shortcode look like in the CK editor?

    (5) If you are using Tracy Debugger then you can check the contents of the variables to see what is going on and trace the issue.

    You may also want to look into using Plyr instead of soundmanager;

    Here's an example of how I'm using it instead of SM2, within a CK editor field:




  4. @Atlasfreeman

    yes technically if it is in the _init, then it should work, unless that variable is out of scope for any reason on this particular file.

    all of the code you showed should all work, so you just need to figure out why those are not working; Did you try the auto option for the assets? How are you getting the JS files to output?

    if the audio is inside a CK editor field then you need to make sure the textformatter is applied to that field in the field settings.

    If you are outputting manually then i think you need to pass the options to the $sm2 instance like is shown in a lot of the posts above with the examples for how to output audio player using the API, as opposed to audio players that live inside a CK editor field and are being parsed like shortcodes, with the textformatter.


  5. @Atlasfreeman

    3 hours ago, Atlasfreeman said:

    Or can any of you see another problem?

    >called "textformatterSoundmanager-master" can this be the problem?

    yes, rename it "TextformatterSoundmanager"

    Also you have to output the CSS files - you can choose your output option in the module, but it won't look right without the CSS. So you can output the $config->styles, or use one of the options..

    Let me know how it goes..

    • Confused 1
  6. I think the issue here is that Tracy is running 2x, and thus the JS error;

    For me this usually happens if i am doing an ajax call to an endpoint and that endpoint is still allowing Tracy to run; I couldn't stop tracy with an exit() like i was able to do in the past for some reason, so i had to disable the template in the module settings.

  7. Thanks - yeah I'm thinking about what is best to use - this is a paywall type of situation, and I like that aMember pro has been around for a long time, and is a 1-time payment not an ongoing subscription... I think i will need to use PW users because this client wants a lot of stuff to change for subscribers, like no google ads, etc..

    • Like 1
  8. Awesome write up and thanks so much for this post and the details – very inspiring. I also recently started using HTMX for a lot of things on PW sites, and am similarly impressed and loving it.

    <off-topic> have a site that I need to develop a subscription/membership system for. I'm looking at amember, memberful, and a special setup using Foxycart. All have their pros and cons, but I see that this site uses amember. I wonder if you have any insights about working with amember... </off-topic>



  9. Hey - cool suggestion; Since Selectize.js is part of the core, this seems like a job for a new module (or hook) – the module/hook would basically initiate the selectize.js assets to be added to the page, as well as a custom js file that would initialize selectize on that field. If I have some time I'll take a look at it..

    • Like 1
  10. i added it, but Github seems to be having a bad day; I also noticed a whole bunch of other new stuff that wasn't committed in the repo, mostly stuff that is attributed to you; I pushed the latest up to GH, and hopefully it will work the same; I haven't had a chance to test it yet today, but will do so soon...

  11. On 9/5/2021 at 8:45 PM, jadon said:

    Will Mailgun's upcoming change to remove plain text smtp passwords from the GET /domains /domains/ endpoints affect this module at all? I have inherited a system that relies on this module so I'm not super familiar with it.


    Sorry for the delayed response; I'm not sure about this – I will have to look into it, but too much work atm; I should have time in October - hopefully it won't be too late!

    • Like 1
  12. There are just a lot of possible reasons, so hard to say what's happening; You need to check logs, see what the actual errors are, which files errors are in.. explain your complete plan/process as to how you are going to upgrade this. 

    You don't even really need to download and upgrade it; I've done dozens of upgrades on live sites. I'd be more concerned about the PHP version upgrade than the PW upgrade; I've had close to zero issues with PW core upgrades; Issues if any usually come from modules or front end code. Before i upgrade any PHP version that a site is running on, i first upgrade everything to ensure compatibility and then do incremental upgrades if the server offers multiple PHP versions - 7.2, then 7.3; 7.4 seems to have the most breaking changes and i'm currently upgrading many sites and finding 7.4 to be the hardest upgrade.

  13. Here are some quick items to consider, based on how I would upgrade a site:

    - start over, back to the original version (2.5)
    - Login as superadmin
    - enable debug mode from the config
    - Make sure the site is fully functional on localhost in the original version;
        if there are PHP errors/warnings on the front end, e.g. related to php version, fix those first before upgrading the site
    - Upgrade any modules that are compatible with 2.5
    - once the site is running with no errors on 2.5, upgrade the core to latest stable version  
        if you replace the htaccess, make note of any settings that need to be copied over (www, https, pro cache etc)
    - upgrade all modules to the latest using the upgrades module

    Note that the new core compiles the non-namespaced files. You can clear the filecompiler cache (bottom of modules) if you see any errors related to that,

    if you still see no content on the homepage, check for js/browser errors;
    Check how assets are being referenced; paths could not be resolving.

    • Like 1
  14. Many thanks for your post and help! All has been revealed, and some facepalm moments...

    (1) had to change $config to wire('config') (🤦‍♂️)
    (2) had to set Tracy config to show in dialog  (🤦‍♂️)
    (3) Yep, i'll just tell people up front if they need to put something in front of it, they need to move the widget..

    • Like 1
  15. Couple of questions and issues...


    On 2/11/2021 at 5:35 PM, Robin S said:
    		// Add JS file to Hanna Code Dialog form
    		$js_file = $config->paths->templates . 'hannas/select_page.js';
    		if(is_file($js_file)) {
    			$js_url = $config->urls->templates . 'hannas/select_page.js?v=' . filemtime($js_file);
    			$form->appendMarkup = "<script src='$js_url'></script>";

    For some reason I can't get this to work at all; not sure why but my hook is in ready.php, and the markup is not appended to the form. I put my js into ACF ProcessPageEdit.js and that works, but it would be interesting to know why the code above didn't work, in case i wanted to keep the js file along with my other hanna code stuff.

    (2) I enabled Tracy in the form (module config), but not getting any tracy...not loading. Wondering if there is any way to troubleshoot that.

    (3) The CK editor widget things are great, makes it much easier for editors to see where a code is, and of course double click it to edit parameters.
    But one thing that is tricky is getting the cursor in front of a widget, if it is the first thing in the editor. For me no problem of course i can just switch to code mode and put in some placeholder in front of it; but for the average user, i do wonder if there is any solution to this...




  16. yep - since the settings definitions are defined in json or php files they can be copied from site to site and then setup in the admin (simply create a page under /admin/ and then set the process as SettingsFactory, then type in the path to the settings definition file).

    In terms of exporting actual settings, like the values, I have thought about that as well, as it would be nice to be able to back up the settings for any given single settings configuration.

    • Like 1
  17. Thanks!! - i just did another test and figured out the problem – tt only recognizes the shortcodes if you have the Hanna Code textformatter applied to the field.

    I'm not actually using Hanna Code, i'm processing the shortcodes with my own textformatter, but using your module to enable editing of my custom shortcodes...

    In any case, you're right and it completely works now; I have the Hanna Code Textformatter after my textformatter so it won't do anything (the codes will all be processed by the time it hits that one)..

  18. Settings Factory was created precisely for this use case - no need to create a module, module config;

    You can also keep your fields in your module with default values, and let your site admins override those in the Settings Factory "settings".

    To put it simply, if you are building out module-like code on the front end, but need to expose settings for things to your editors, Settings Factory has the ability to create unlimited settings pages, each with their own permissions...

    • Like 2
  • Create New...