Leaderboard
Popular Content
Showing content with the highest reputation on 11/25/2019 in all areas
-
What we're discussing is a feature request rather than a bug to report, and there already is the feature request I linked to in my earlier post. I've added a comment linking to this thread but like all such things Ryan will just get to it when he gets to it. This is feature request 13 of 269 and counting. ?6 points
-
It's probably not an issue with a missing 404.html/.php or a missing config entry. But I'm happy to see you worked through possible solutions. Possible reasons As you are using a DEV release there can be a problem with an installed (3rd party) module. Maybe it's just an error in a query/selector you are using in your template.php or _init.php or init.php or ready.php - yes, there are several possible reasons for that error but let's start at the beginning. Did you just installed ProcessWire or are you in the middle of an ongoing project? If you just installed ProcessWire you want to look in your .htaccess file - look here: https://processwire.com/docs/start/install/troubleshooting/#resolving-an-apache-500-error and check if mod_rewrite is enabled. If you are in an ongoing project open up the used template, take a look at your page selectors there and doublecheck them. Btw... welcome to the forums!3 points
-
Just chucking this in here incase anyone else has this problem. Upgraded to the latest dev and it failed (I never get that!!!!!) I got the warning: Warning: require_once(/sites/domain name/wire/core/ProcessWire.php): failed to open stream: No such file or directory in /sites\domain name\index.php on line 32Fatal error: require_once(): Failed opening required '/sites/domain name/wire/core/ProcessWire.php' (include_path='\php\PEAR') in \sites\domain name\index.php on line 32 Turned out it hadn't renamed wire-3xx to wire This was locally using XAMMP. So, if you see this, check: Has it renamed the wire directory, And if everything extracted okay. (I have seen that on another post once, I think). Okay, back to what you were doing!2 points
-
Module update to v2. Now it's possible to add or extend existing icon library via config file. Please check first post for example usage. Note: Hook method removed !2 points
-
New Version 1.0.4 - Fixes empty value bug for FieldtypeInteger. @dragan I was able to reproduce error for FieldtypeInteger. Turns out ProcessWire returns an empty string instead of null when FieldtypeInteger is empty. That's why GraphQL schema was complaining about getting empty string instead of Int. Let me know if the latest patch works for you.2 points
-
Thanks Joss. Glad you found it and it's working well for you. We use it on all our installs where I work.2 points
-
2 points
-
FieldtypeFontIconPicker Supported Icon Libraries FontAwesome 4.7.0 Uikit 3.0.34 IonicIcons 2.0.1 Cahangelog NOTE: Module store data without prefix, you need to add "prefix" when you want to show your icon on front-end, because some of front-end frameworks using font-awesome with different "prefix". Module will search site/modules/**/configs/IconPicker.*.php and site/templates/IconPicker.*.php paths for FieldtypeFontIconPicker config files. All config files need to return a PHP ARRAY like examples. Example config file : create your own icon set. File location is site/configs/IconPicker.example.php <?php namespace ProcessWire; /** * IconPicker : Custom Icons */ return [ "name" => "my-custom-icons", "title" => "My Custom Icon Set", "version" => "1.0.0", "styles" => array( wire("config")->urls->templates . "dist/css/my-custom-icons.css" ), "scripts" => array( wire("config")->urls->templates . "dist/js/my-custom-icons.js" ), "categorized" => true, "attributes" => array(), "icons" => array( "brand-icons" => array( "title" => "Brand Icons", "icons" => array( "google", "facebook", "twitter", "instagram" ) ), "flag-icons" => array( "title" => "Flag Icons", "icons" => array( "tr", "gb", "us", "it", "de", "nl", "fr" ) ) ) ]; Example config file : use existing and extend it. File location is site/configs/IconPicker.altivebir.php <?php namespace ProcessWire; /** * IconPicker : Existing & Extend */ $resource = include wire("config")->paths->siteModules . "FieldtypeFontIconPicker/configs/IconPicker.uikit.php"; $url = wire("config")->urls->templates . "dist"; $resource["scripts"] = array_merge($resource["scripts"], ["{$url}/js/Altivebir.Icon.min.js"]); $resource["icons"]["flag-icons"] = [ "title" => "Flag Icons", "icons" => array("tr", "en", "fr", "us", "it", "de") ]; $resource["icons"]["brand-icons"]["icons"] = array_merge($resource["icons"]["brand-icons"]["icons"], array( "altivebir" )); return $resource; After you add your custom config file, you will see your config file on library select box. Library Title (Location Folder Name). If your library categorized and if you have categorized icons set like uikit and fontawesome libraries, you will have category limitation options per icon field or leave it empty for allow all categories (default). Example : output if ($icon = $page->get("iconField")) { echo "<i class='prefix-{$icon}' />"; } MarkupFontIconPicker Usage // MarkupFontIconPicker::render(YourIconField=string, Options=array) echo MarkupFontIconPicker::render($page->YourIconField, [ 'prefix' => 'uk-icon-', // Icon class prefix, if you have different prefix, default is : "fa fa-" 'tag' => 'span', // Icon tag default is : "i" 'class' => 'fa-lg', // If you have extra cutom classes, for example : icons sizes, Array or Sting value 'style' => 'your custom styles if you have' // Array or String Value ]); Theme support Search support Category support1 point
-
Wow, thank you both so much for answering so quickly! Ahh, I feel stupid now. I downloaded the dev release two months ago, when I was still playing with Processwire and before deciding to use it... looks like I forgot that I was not using stable. Thanks for your help and for the welcome ? Thank you! Upgrading to the 3.0.146 version fixed the error immediately.1 point
-
This was fixed in 3.0.144: https://github.com/processwire/processwire-issues/issues/10271 point
-
That's fine. You should set it under legalFields config. The legalPageFields is for built-in fields like name, id, path, url, created and etc. I'm still not sure how this could be happening. You're the second person with this problem but I can't reproduce it. Page reference fields have title and I can query them on my installations. Is there any chance that you can reproduce this in any of the Site Profiles? Then you can export it with Site Profile Exporter and share with me. I will continue trying to reproduce it but it'll go faster if you help me with it.1 point
-
Thank you! Dude, you really have patience ? The source of the problem was the Media Widget plugin , which wraps another figure element on the image element, although now there is an outer figure has the correct class ?♂️. I could swear it wasn't there before... Oh well... Didn't need the plugin, so I uninstalled it. To summarize, to have it noted down and to pick the brains of the experts, this is what I did to get the styles working: 1. created /site/assets/css/ckeditor_contents.css (my choice of path) containing some of the framework's styles, like .has-text-danger { color: hsl(348, 100%, 61%); } .is-pulled-left { float: left; } 2. created /site/assets/css/admin.css containing my custom admin styles like /* custom CKEditor styles to have in PW admin interface */ @import url("../../assets/css/ckeditor_contents.css"); /* force a min width for CKEditor combo, so I can read the text */ .cke_combopanel { min-width: 25rem; } 3. imported the same /site/assets/css/ckeditor_contents.css on top of /site/modules/InputfieldCKEditor/contents.css /* custom CKEditor styles to have in PW admin interface */ @import url("../../assets/css/ckeditor_contents.css"); 4. linked /site/assets/css/admin.css on top of /site/templates/admin.php, right at the beginning of the file, before the line requiring the controller $config->styles->add($config->urls->assets.'css/admin.css'); 5. changed classes in the Page Edit Image module settings (the link is /ADMIN_FOLDER/module/edit?name=ProcessPageEditImageSelect) aaaand... I got this (with Bulma classes) ? As you see, I have even the kitchen sink in there, it's because of my condition called what-if-I-ever-need-it-osis ? Thank you!1 point
-
Hi jploch, Sorry I missed this before. Which input field(s) is the auto-select not working for? Also, which PW version and admin theme are you using? Glad you're finding the module useful!1 point
-
1 point
-
That's what @elabx said! :-) ?? Good to see you (again) as always ?.1 point
-
@elabx was right :-) Here't two ways in addition to @dragan's above: Method 1: Call Hanna inside your function function SomeFunction(){ $out ="<div>"; // hanna in here $hanna = wire('modules')->get('TextformatterHannaCode');// @note: wire! $out .= $hanna->render("[[hello]]"); $out .="</div>"; return $out; } $out = SomeFunction(); echo $out; Method 2: Pass your function an argument/parameter with Hanna rendered output $hanna = $modules->get('TextformatterHannaCode'); $hannaString = $hanna->render("[[hello]]"); function SomeFunction2($string){ $out ="<div>"; // hanna in here $out .= $string; $out .="</div>"; return $out; } $out = SomeFunction2($hannaString); echo $out;1 point
-
I never used Hanna Code myself, but can't you just do $buttons = $hanna->render("[[subscribebuttons]]"); and then $out .= $buttons; ? Don't know if you gotta have $hanna = $modules->get('TextformatterHannaCode'); inside or before your function definition though...1 point
-
This is really the problem: the fieldtypes/inputfields having no support for pagination. I hit that on a project of mine, where users are linked to tickets. Given that the event in question does attract up to around 10k users registering I needed to hide the inputfield completely, because even just showing the value uneditable would load all the users when showing the ticket.1 point
-
1 point
-
1 point
-
New Version Release: 1.0.3 - Improves performance for FieldtypeFile & FieldtypeImage fields. @dragan Looking forward to your feedback. I'm still very curious how you managed to get 6s response time from GraphQL. Let me know how the latest version works for you. @nbcommunication That's great to hear! Any involvement is absolutely welcome. If you have your module available on github or some other place I would love to look at your approach and maybe steal some ideas ?. Also, if your implementation is different than mine I would encourage you to finish it. We will only benefit from different approaches.1 point
-
I can't reproduce that here. If you insert an image without the caption checkbox checked then the plugin inserts an image with the class applied and doesn't insert a wrapping figure element. <p><img alt="" class="align_right" src="/site/assets/files/1/colin-watts-1141600-unsplash.300x0-is.jpg" width="300" />Lorem ipsum dolor sit amet, adipiscing elit. Nullam dignissim convallis est. Quisque aliquam. Donec faucibus. Nunc iaculis suscipit dui.</p> If you insert an image with the caption checkbox checked then the plugin inserts a figure + img + figcaption with the class applied to the figure element. <figure class="align_right"><img alt="" src="/site/assets/files/1/colin-watts-1141600-unsplash.300x0-is.jpg" width="300" /> <figcaption>Your caption text here</figcaption> </figure> <p>Lorem ipsum dolor sit amet, adipiscing elit. Nullam dignissim convallis est. Quisque aliquam. Donec faucibus. Nunc iaculis suscipit dui.</p> Something to be aware of is that if you change the alignment classes for Page Edit Image from their defaults you need to allow those classes in the Extra Allowed Content setting for the CKEditor field. img figure(is-pulled-left,is-pulled-right) It would be better if the class names configured in Page Edit Image were automatically allowed - there's an open issue about this: https://github.com/processwire/processwire-issues/issues/8001 point
-
ProcessWire 3.0.146 contains about 22 commits (relative to 3.0.145) and these commits are largely focused on resolving reports from the processwire-issues repository. However, there have also been several improvements and related additions. One of these additions was a foundational upgrade that adds support for Fieldtype modules to use a custom class for Field objects. This will open more possibilities for improved Field/Fieldtype-specific APIs. Several have asked for improvements in the APIs of Repeaters and other fields, so this is a step that begins the lay the tracks for moving in that direction. Traditionally the API calls for working with Fields and Fieldtypes have not been nearly as simple as those that work with Pages, so this will be an upgrade that narrows and eventually eliminates that gap, longer term. On the core side, I currently plan on using this to improve the API for Repeaters, Comments and Options fields, and perhaps others. Outside of the core, ProFields will eventually take advantage of custom Field objects as well. As usual, none of this will break any existing code, but it will add simplicity for those that work with Field/Fieldtype APIs in ProcessWire. As for other changes in 3.0.146, I think last week’s ProcessWire Weekly did a great job of covering them, so if you are interested be sure to check that out. Next week is partially a holiday week here in the US, so I’ll be on a little bit of a reduced schedule, but will still be working on the core. I’m also releasing a new module into the ProDevTools set of modules next week, so I’ll tell you more about that one in next week’s blog or forum post. Thanks for reading and have a great weekend!1 point
-
Just for the record (not saying that it would be the best solution overall), FieldtypePageIDs also has certain benefits if/when the problem is loading too many Page objects into memory. It could be worth looking into in this sort of situation ?1 point
-
I'm glad you believe @Robin S if you didn't want to believe me ? Just create a custom $page method that does your logic, then you have your own performant API. That should get you started: $wire->addHook("Page::readByUser", function($event) { $result = $this->database->query("SELECT id,templates_id FROM pages LIMIT 5"); $ids = $result->fetchAll(\PDO::FETCH_OBJ); $user = $event->arguments(0); d("check for user $user"); $event->return = $ids; }); d($page->readByUser($user));1 point
-
1 point
-
New version release! 1.0.2 I am very happy to inform you guys that the new major version of the module is out. ⚠️ WARNING: Breaking Changes! ⚠️ The module was rewritten to use webonyx/graphql-php instead of youshido/graphql. This was a big issue because the latter was not properly maintained anymore and the webonyx/graphql-php gone very further in development and supports more features that we need. There are some more breaking changes that are listed on the latest release page. What's new trash(id: ID!): Page! field allows to move pages to trash via GraphQL api. Solves N+1 problem for FieldtypePage field. Significantly improves response speed! Support for even more ProcessWire permissions. Now the full list is: page-add page-create page-delete page-edit page-move page-view page-edit-created page-edit-trash-created It is already available in ProcessWire's modules directory. So you can install it via class name.1 point
-
Alright. So I'm converting a site I already have to Processwire (really enjoying it so far!). I wanted to convert the previous tables that I had data in to Processwire pages. But I'm wondering what the optimal way to structure pages would be. So basically, I have three main tables. Users (and all accompanying information) Items (and all accompanying information) Aquariums (each user only has 1 aquarium. Currently, user_id is a FK) Fish (type of item. Aquariums may have multiple fish) Aqua_settings (Things like lightness, temperature, etc) So in my current setup, there are a lot of Foreign Keys. I could accomplish essentially the same thing by using the Page Reference field. Alternatively, I could make fish and aqua_settings both be children of Aquarium. I could differentiate by doing $aquarium->children('template=aqua_settings'); or something. So my question is...should I be using the Page Reference field or structuring the pages as children? (Or are both equally fine depending on how I want to go about doing things)1 point