Jump to content

Macrura

PW-Moderators
  • Posts

    2,708
  • Joined

  • Last visited

  • Days Won

    38

Posts posted by Macrura

  1. The TextformatterSoundmanager https://processwire.com/modules/textformatter-soundmanager/ works well for embedding audio files, but uses shortcodes.

    This module is a good choice for simple things where you wouldn't need a playlist or control the skin etc, like you can do with SM2 module.

    You could also skin the audio element using something like plyr.io, which is a nice replacement for the default player. MediaElement.js also works in a similar way.

    I can see using this module for quick and simple applications though.

    • Like 1
  2. Just chiming in - I don't have a solution in terms of why the sessions are not clearing when you visit the Setup -> Sessions, but for me, going to Setup -> Sessions does clear the old sessions.

    The first time I realized this was an issue was seeing the number of records in the sessions table; once i cleared those, the database shed something like 50-100MB. I also read some of the other solution (involving the ini_set) and this didn't work  - it seemed to make the site basically tank, and run really slow.

    ... and i guess my point was that this sessions not clearing in the DB is still an open issue, at this time..

    • Like 2
  3. @cstevensjr,

    this started on Wednesday of this week when Dreamhost made some bizarre unilateral ModSecurity setting that broke every ProcessWire site's ability to upload images or files.

    You have to open a support ticket and tell them to change the ModSec setting for every domain on your account to allow the CMS to work. They should be able to check their logs and know what to change, but you also might have to go back and forth with them and test it. I exchanged probably 10 emails with them on Wednesday while they repeatedly tweaked the ruleset until i was able to upload again.

    Last night i had to send them a list of ~20 sites that they had to adjust the ruleset for and they replied today that it is now done, but only time will tell if I start to receive complaints from site owners that they can't upload.

    This is certainly disappointing behavior from Dreamhost, and they should make amends. Hopefully they are going to learn a hard lesson once they get an avalanche of support complaints about this.

    By the way, you can easily tell what the problem is, if you upload while viewing the network panel. You'll see probably a 418 error and when you view the response you'll see Internal Server Error. 418 is the DH response for anything related to ModSec. In addition you can go into the server logs and open the log file (which may be pretty huge by now) and see the mod sec errors.

    • Like 9
  4. these are errors in the vendor library, which is PW core, so nothing i can do to fix it; Only possibility is that your JS in the field settings has an error.  I'm not getting any console errors with any pages running selectize inputfields, or any image fields using tags (which also use the PW core selectize.js).

  5. @gornycreative 

    Currently the fix for the issue you reported is the one i provided. I don't know the internal specifics, but the arrays are not reset when saving the value/processing the form the first time, which is why I had to force any array value to a new array.

    So you will end up with no [0] index item under some circumstances unless you apply the fix.

    You can test it by dumping the value and then adding items to any multi page reference field, and then removing them one by one and hit save and look at the arrays.

    Also note that any 2nd save of the settings page does reset the arrays fully. It must be something to do with where/which hook we are processing the form input; For now this is a safe fix, and i'll cary on researching any further optimizations, but this may be the resolution.

    • Thanks 1
  6. @gornycreative -

    you can try changing this line (221)

    $valuesArray[$key] = $f->attr('value');

    to this:

    $valuesArray[$key] = is_array($f->attr('value')) ? array_values($f->attr('value')) : $f->attr('value');

    which should always force any value that is an array to reindex to 0 based.

    Let me know if that solves it.

  7. This one is designed to work in the admin, so all of the settings, and how the javascript works is only going to work in the admin.

    But it's such a simple plugin, you could easily roll it into a formbuilder form.

    • Like 1
  8. I think it is an important and valid question, discussion topic.

    One option is to let the admin set, within the module config, which template(s) to be used for X purpose, which page root, and so on. (This is how it is done in various modules).

    Another option is to include JSON files for field, template and page creation with the module and let the admin install them.

    Or have the option to install the fields, templates and pages, or not (using a checkbox in mod config), like in the AdminHelp module. This means that anyone who downloads the module will be able to make their own decision about if they want to install all of those things.

  9. 13 hours ago, Sevarf2 said:

    Any update? I can't download the module, even from github, it's no longer available?

    Hi @Sevarf2 - i haven't tested the mod, so was hesitant to commit the change, but i should be able to do it this week. Are you having the same issue as Martijn?

  10. Cool - i was building this, but i got stuck on the Unsplah api which was telling me they didn't like downloads and wanted to only allow usage that would use the source image from them, and this wouldn't work with an images inputfield, or imagesizer engine, or any other image manipulation like srcsets etc; So i gave up... Looks like somehow you solved all of this, so thanks!  Does this use a fixed api key, or will that api key need to be configurable at some point?

     

    • Like 1
×
×
  • Create New...