Leaderboard
Popular Content
Showing content with the highest reputation on 05/16/2018 in all areas
-
I am out of idea right now - I have 15 minutes, if you want I can take a look at your install if you feel confident.. Edit: was a browser cache issue.3 points
-
@bernhard It does seem to work - or do you mean you are not able to add the .noAutosize classes? @Robin S Just added the cache bust strings to assetpaths, thanks for the suggestion. Will be available in v1.9.4. Here is a preview of the Fields page with additional data like inputfield classes, description, notes and IDs. It seems impossible to add column headers to the extra columns but i think it's quite obvious even without them.3 points
-
There's a mixup of variables in the log output in removeExpiredDirs, namely $path and $pathname in lines 278 and 291 that got switched around. The empty value is output because there's no subdirectory to delete in the temp dir so $pathname never gets a value. Otherwise, the path of the last subdirectory in the loop would be (wrongly) logged. I have opened an issue.2 points
-
What I have sometimes found helpful in such cases is to bootstrap PW and render the page in question from the command line, i.e. something like php -r 'namepsace ProcessWire; include("index.php"); $p = $pages->get("ID_OR_PATH_OF_YOUR_PAGE"); $p->render();' since PHP CLI is usually a bit more talkative when things go haywire. Might be worth a try.2 points
-
Now the new websites I build them only with Processwire. It is a powerful CMS and the community is very serious and professional. ?2 points
-
2 points
-
Thanks so much! Now it works perfectly. Can I offer you a coffee? ☕2 points
-
OK i will check it (no power here at the moment) so may take till next week to test as you have outlined the issues.2 points
-
I think I am missing something, because to achieve what you asked, you have to write : [...] foreach($stories as $story) { if(count($page->imagefieldname)) { // images exist, we show the div echo "<div>...</div>"; } [...] } [...]2 points
-
Sure. I have that installed as well. But very often, I need to do stuff that's not possible with that module, or simply easier to do writing a few lines of code myself.2 points
-
That's a classic use-case for page reference fields. Create a dedicated page that acts as parent for all your product types. Underneath, create a page for every product option. Then you can easily foreach($page->children) etc.2 points
-
Over the years, I accumulated so many custom API scripts, that I have decided at some point to simply include a special template in my PW boilerplate that holds all these utility / "batch-operation" API scripts in one place. In the template settings, I allow URL segments, and make sure access is for superusers only. This "API-scripts" template has (for better maintainability / readability) a simple switch/case that loads a certain .php file via include: So, if e.g. I need a quick listing / overview of all fields that a certain template has, I go to: mysite.com/api-scripts/fields - then I go back and lock the template again = comment the first few lines for security reasons (one can never be too paranoid...). For me, these are big time-savers, because even if you have to modify the included scripts for the current project, at least I don't have to search for these scripts over and over again and guess "where have I been using something similar the last time?" tl;dr: It's like having the whole PW-recipes site (and more) always at your fingertips ?2 points
-
1 point
-
I already have 109 and it's working. So, jumping straight ahead to 3.x? Will try and report back, probably on Sunday. Thx dragan & horst. I upgraded PW from 2.5.4 to 3.0.104 and then php from 5.5.12 to 7.2.2 in one go. Everything went fine. I needed DynamicRoles module that is compatible with PW3.1 point
-
yep. And / or: open the site in incognito mode. Everytime you close the browser in incognito mode again, the cache gets cleared automatically.1 point
-
I'm in process of upgrading PW 2.5.4, PHP 5.6.8 and using TextformatterVideoEmbed version 109. When I upgrade this module to the latest version 111 I get Compile Error: Cannot make static method ConfigurableModule::getModuleConfigInputfields() non static in class TextformatterVideoEmbed (line 18 of \site\modules\TextformatterVideoEmbed\TextformatterVideoEmbed.module) Is it possible that this method is problematic? version 109: public static function getModuleConfigInputfields(array $data) { version 111: public function getModuleConfigInputfields(array $data) {1 point
-
Running PW on non-standard ports shouldn't be an issue. Did you develop in a subdirectory? If yes, there might be a leftover RewriteBase entry in .htaccess interfering with URL rewrites.1 point
-
okay ? PS: to update the modules directory, just re-submit the module and the module will be updated automatically in a second.1 point
-
Ah, sorry @flydev I missed that this happens when clicking on the module's page and not during installation. I pushed an update that does the check if RockGrid is available, otherwise it does not add this field (and shows only SQL). The process module is not really helpful without RockGrid, I know, but the day will come where I can release RockGrid ?1 point
-
Installed a stock ProcessWire 3.0.102 I Downloaded the module RockFinder 1.0.0 I installed RockFinder I installed ProcessRockFinder I clicked Setup > RockFinder tester I have the same warning / error. Just for testing I replaced InputfieldRockGrid on line 50 by InputfieldTextarea, I can access the process module.1 point
-
1 point
-
I have a list of a few others that seem quite interesting (some of which also serve as an alternative to Slack, including one from Atlassian), but I've just found that the following one is going to be the basis for the French State's new secure messaging system: https://about.riot.im/ (based on https://matrix.org/). (Not to be confused with RIOT - The friendly Operating System for the Internet of Things.)1 point
-
Yes, that's PHP, but you can also inject JS in a hook with $js = "<script>your script here...</script>"; $event->return = str_replace("</body>", "{$js}</body>", $event->return);1 point
-
1 point
-
To be exact, I did this: if(count($story->imagefieldname)) { ... } Thank you again!1 point
-
from march 2018 "Use Strict Mode for Redirect URIs" is is enable for everyone and you just can't disable it1 point
-
Hi everybody! It appears that there's a problem with the new version of General Settings 1.2.2 and PW 3.0.102 (without Lister Pro). Tried to install the General Settings 1.2.2 onto a fresh PW 3.0.102 via ModuleClassName, got an error of kind "GeneralSettings module is required". Also tried to download and install the General Settings 1.2.2 manually. Now the installation zip archive holds two modules: GeneralSettings.module and ProcessGeneralSettings.module . Tried to install GeneralSettings.module first, it was okay, but it appears that this module configuration has no effect. Tried to use $g_settings->my_setting_name in templates, no effect, $g_settings is NULL. Another glitch: there's no possibility to edit the settings via GUI at General Settings configuration page, could only trash/untrash and reorder them. The only way of adding/editing the settings is to edit the JSON on the same page. Finally went back to older ProcessGeneralSettings 1.1.4 which works like a charm. Thanks in advance for the possible debug and corrections!1 point
-
Hi, more infos: https://processwire.com/api/fieldtypes/images/1 point
-
I don't really understand your question. Please explain "directly" and "field type"? PW inputfield types?1 point
-
Create a "settings" template (name it whatever you want). You only need one field: title (or multilang title). Create a page somewhere. That will only serve as a parent / container page. Create as many pages underneath this parent page as needed. One page per select option. Then, in the template you want to build your form, basically do something like $settings = $pages->get(123)->children; // 123 is the id of the parent page foreach($settings as $s) { echo "<option value='{$s->title}'>{$s->title}</option>"; }1 point
-
Its one of the new Facebook security things yes. Please have a read to this article and please don't slap me with a large trout, its a WP oriented blog ! ? https://wp-native-articles.com/blog/news/how-to-fix-facebook-apps-error-cant-load-url-domain-url-isnt-included-apps-domains/1 point
-
1 point
-
@rareyush sorry, its a custom function, you can copy paste the code in _func.php or where you want : /* * replace the last occurence of $search by $replace in $subject */ function str_lreplace($search, $replace, $subject) { return preg_replace('~(.*)' . preg_quote($search, '~') . '~', '$1' . $replace, $subject, 1); }1 point
-
It's certainly not intentional. https://github.com/LostKobrakai/Migrations/blob/master/classes/ModuleMigration.php There's what a module migration does. I'd expect that $this->modules->install($name) would also take care about installing any permissions of modules. — I just quickly checked the source and it seems this method should handle that.1 point
-
Hi @tpr, a feature request: could you add a cache-busting query string (e.g. using filemtime) to the assets added from the "Asset Paths" section of AOS? Thanks!1 point
-
Hey guys. Fresh off the oven. We're still polishing a bit, but went live anyway: https://inovtex.com/ Sorry this one is in Portuguese only, so you'll probably need the old google translate for it.1 point
-
I just relaunched my portfolio website. It's my first ajax driven website using ProcessWire as a CMS. Its a showcase of some of my work as well as a digital playground to improve my coding skills. If you encounter any bugs or have feedback, feel free to share janploch.de1 point
-
The ProcessDashboards module which is the latest iteration of this is back to being a simple helper module, close to the original Dashboard module by @Pete, but with some additional features, and that the module no longer changes anything in the admin, meaning that it doesn't auto-change the admin page to use the process; instead you create one or more dashboards, and input the path to a php file to render the dashboard; if you want to use one of them as the admin home screen, then you just change that admin page's process to use this module (ProcessDashboards). Since making dashboards is fundamentally creating markup, it is better to keep all of the files for the dashboard in the templates folder. Also, if there were to be any dashboard module that output markup, it could become difficult to support multiple admin themes. Users of UIKit theme could build a simple dashboard using all native UIKit markup and not have to include a css framework (as i have done for the examples, which run inside the reno theme). Since this type of setup is not really suitable for a standalone module, or a site profile, i see it more as a construction kit. You need the base module; if you want to use the shortcuts and widgets functionality, there is another module that installs all of the fields & templates for that setup; You need the files that generate the dashboard(s) and the widgets that go in the templates folder, including css/js, libraries, widget partials, and functions. Hopefully this can all be on GitHub soon, once i sort out some issues with my current dev computer (old os no longer being able to connect to github)...1 point
-
So at least we have more than 8800 sites using Processwire https://publicwww.com/websites/"X-Powered-By%3A+ProcessWire"/ @jmartsch take a look at this link1 point
-
Hello, Wow ok, there is so many ways to do what you are trying to do. I would have to understand your site better to be able to say what would be the most efficent way. But just to give you an idea, you could create a module that hooks the matching inmuebles as a property for the cliente-pages. I have done this by taking the big if(...) you created and turning it into a selector. public function init() { $this->addHookProperty("Page::inmuebles", function (HookEvent $e) { $page = $e->object; // We only execute for cliente-templates if($page->template->name != "cliente") return; $sanitizer = wire('sanitizer'); // Create the selector "template" $selector = "template=%s"; $selector.= ",prop_precio<=%s"; $selector.= ",prop_habitaciones>=%s"; $selector.= ",prop_tipo_inmueble=%s"; $selector.= ",prop_tipo_transaccion=%s"; $selector.= ",prop_zona=%s"; // The values $values = Array( "Inmueble", $page->prop_precio, $page->prop_habitaciones, $page->prop_tipo_inmueble, $page->prop_tipo_transaccion, $page->prop_zona, ); // Make the selector safe $selector = vsprintf( $selector, array_map(Array($sanitizer, "selectorValue"), $values) ); // Make the property hold the pages found by the selector $e->return = wire('pages')->find($selector); )); } Then you can do $clientes = wire('pages')->find("template=cliente, cliente_busca=1, include=all"); foreach($clientes as $cliente) { $out.= "..."; foreach($cliente->inmuebles as $inmueble) { $out.= "..."; } } This only makes sense if you always want to fetch the inmuebles in real time. There are other ways to achieve the same results too. Of course if you don't want to create a module, then you could just make a function that returns the selector for the cliente and use that with a find().1 point
-
Nice one Reno. I just tested and it works! My quick mash - I am sure it could be improved. $template = $templates->get("your-details"); foreach ($template->fields as $field) { $fieldlabel = $template->fieldgroup->getField($field, true)->label; echo "<label for='$field->name'>".$fieldlabel."</label>"; $inputfield = $field->getInputfield($page); echo $inputfield->render(); }1 point