-
Posts
2,771 -
Joined
-
Last visited
-
Days Won
40
Everything posted by Macrura
-
I have this issue on 2 sites so far - not sure how to fix it – do i need to manually create a dumps.json file in the site/assets/cache/TracyDebugger/ directory? Warning: PHP Warning: file_put_contents(.../public/site/assets/cache/TracyDebugger/dumps.json): failed to open stream: No such file or directory in .../modules/TracyDebugger/includes/TD.php:154
-
@adrian - I don't see any errors in my console. I don't have any sites running latest dev, but did just check on latest master and don't see any issues. Can you post your field settings?
-
this one still works great for me: but appears to have been removed from the modules directory. I'm using it on current sites.
-
Awesomplete? https://processwire.com/modules/text-input-awesomplete/
-
@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.
-
@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.
-
@gornycreative - thanks for the report, i will test this and post back asap.
-
Maybe S3 doesn't support fopen (?), i use this for getting files from S3 (though the files are protected); https://css-tricks.com/snippets/php/generate-expiring-amazon-s3-link/
-
Page Ref/Select field in Module Options?
Macrura replied to cosmicsafari's topic in Module/Plugin Development
yes confirmed- 2 replies
-
- 1
-
-
- page select
- checkbox
-
(and 1 more)
Tagged with:
-
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.
-
cool - thanks - did it and it worked. Sorry for the 'false alarm'...
-
I started getting this error with the latest version: PHP Warning: in_array() expects parameter 2 to be array, string given in .../TracyDebugger/TracyDebugger.module.php:1078
-
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.
-
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?
-
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?
- 15 replies
-
- 1
-
-
- media
- stock photo
-
(and 2 more)
Tagged with:
-
@Martijn Geerts - many thanks for taking the time to make the fix here! I will implement is and do some tests and update the module soon.
-
Pageimage: ksgcenter.0x260.webp - not a supported image type
Macrura replied to fisnik's topic in General Support
The Processwire admin does not support webp. Webp is an output format, but not a valid source format for images. The Imagesizer engine of Processwire is not capable of resizing webp images, therefore when you save, it cannot generate the thumbnail, and that's why you get the error. You'll need to delete that webp image and upload a jpg instead. -
@MarkE cool, i should be able to work on this soon, definitely in June, and will make some improvements according to your suggestions. If you want to post the mods here i can look at them.
-
hey thanks - yeah, as you can see from the way the module is setup, it doesn't force you to use the installable fields, so in theory you could just setup any template you want to use for help docs, and any family relations required; and then you just select those in the module config. The default, out-of-the-box behavior is to be only 1 level. As far as i can see in the process module, if any help doc has children, they do get rendered; are you saying you need to go down a 3rd level?
-
for (1) I'll need to call getFormatted which is what we do in ProcessDocumentation: $docBody = $docPage->getFormatted($this->body_field); Not sure what #2 is, in terms of a pop-out button; I also see now that this module has a hardcoded fieldname for the help doc body, so that needs to become configurable, as it is in ProcessDocumentation.. My original version did recurse down one level to child pages of the help pages...
-
@MarkE - should be ok to use this, and i wouldn't say that this module is no longer supported, if there were to be a bug report, pull request, or feature request, this module is still live and functioning, and may receive future updates, especially with regards to permissions and flexibility of use. But in the meantime as mentioned above, ProcessDocumentation is a bit of a larger scale module and was designed so that it would be possible to have unlimited documentation pages, all accessible from the top admin menu, as well as the ability to download the PDF; In conjunction with the ContextHelpTemplate, you can achieve the same functionality ad Admin Help, so that you have a tab for help right on the page editor, which can open in the panel (instead of wiretab) if preferred. So in that sense, ProcessDocumentation is an evolution of this module, but doesn't necessarily replace it for simpler use cases. It is also possible that this module, AdminHelp could use updates to support pw panel, or other features of ProcessDocumentation.
-
Cool!
- 3 replies
-
- 1
-
-
- tags
- thumbnails
-
(and 2 more)
Tagged with:
-
@Pretobrazza, OK (1) so i just made a small modification which will convert the extension to all lowercase before it checks the field settings - each field has a list of allowed extensions; i'm guessing you don't have both jpg and JPG, so this will solve this hopefully. (2) Processwire expects an integer for image width, so if there is a % in the width, i guess the imagesizer is fatal error. I don't think it is technically correct to have anything other than an integer in the width attribute, but I have updated the module to skip resize for any images that have a percent in the width attribute. (3) You can run a simple script in Tracy Debugger; $p = $pages->get([page id]); foreach($p->children as $c) { $c->of(false); $c->save(); } @Pete - sorry for not replying to your post, i wasn't following this topic for some reason, so i didn't see your post. I'll look into the multilanguage thing, so that it scans all of the languages. I'm. guessing that right now it doesn't work at all for importing images in a multilanguage RTE field.
-
Using a single parent template for different child pages
Macrura replied to Aleksey Popov's topic in General Support
this one works great for this scenario: https://modules.processwire.com/modules/templates-child-pages/ -
The module has been updated and now loads the prev/next links via ajax, which should hopefully solve any issues with the module potentially slowing down the page editor load. The work of finding the prev/next pages is handled by an ajax request after the editor is loaded. Been tested on all 3 admin themes, with link locations in breadcrumbs and in tabs.