Leaderboard
Popular Content
Showing content with the highest reputation on 10/12/2022 in all areas
-
https://bluefox.studio/ What makes this project cool: We rebranded the clients logo, turning it into a 3D, Three.JS intro presentation The client can mange all aspects of the site via ProcessWire populating their impressive showcase Custom front-end design and UI and full content management across evey aspect of the site. Modular system for page content providing maximum flexibility on page construction. SEO module with global editing section across all pages. Global shared content modules.7 points
-
Thanks - i will check and see if this can be fixed, or I'll add info to the instructions about hidden pages.2 points
-
I pushed a new version with two additions: the first one adds the ability to select specific roles to bypass the cache and thus convert the MJML code on each page render. I don’t think it will be used much but it’s there in case the cache invalidation when saving the page or updating the template’s file is not enough the second one is more interesting as it adds the ability to generate a unique output per GET variable. Previously a GET variable would just output and save to the page’s cache but now you can specify GET variables (or the wildcard "*") to have a cached version per variable. Please note though that, when rendering, if there are several GET variables only the first one is used. `raw` is ignored as it’s used by the module. My current use-case for this is having a "browser" version (with ?browser) where I can display a newsletter with the right webfont. I also added a small note in the settings regarding TracyDebugger to invite module users to disable the panel bar for the MJML templates. TracyDebugger hooks to `render` as well and thus some of its markup might end up in the converted code when showing the `raw` version. I think by now this can be considered "beta", though please test on your local environment first and let me know if you notice anything.1 point
-
Unfortunately from discussions I've seen, it's either unlikely that HTMLPurifier will be implementing a supported HTML5 Doctype, or it will be quite awhile before one arrives. They're taking contributions, but the amount of work (and surrounding understanding) seems daunting. The removal of unsupported elements would be part of the unforeseen consequences I mentioned. I'd still recommend using a call to str_replace instead if you do decide to stick with this. That said, using <br/> or <br /> is not invalid, and is allowed. You're seeing info messages in the W3C validator service, not notices or warning messages. It's because HTML5 doesn't require (like XHTML did) that element attribute values are contained within quoted strings, and if an element using unquoted values ended with a trailing slash and no word boundary, it could cause confusion in the browser. See their example for more info: https://github.com/validator/validator/wiki/Markup-»-Void-elements#trailing-slashes-directly-preceded-by-unquoted-attribute-values This was a great exercise in how to customize the HTMLPurifier and CKEditor components, but I'd personally recommend, at least in this instance, not making that change. That said, it's completely up to you, and you have a working solution for your target goal now!1 point
-
1 point
-
Thx adrian totally forgot about that setting since it's always enabled for me ? Seems to work now and was an easy fix: https://github.com/baumrock/RockFrontend/commit/eafe6b9bf46150101723c5dfa874ce0412dee47e1 point
-
Sorry, I am confused why not loading Tracy makes sense in this case, but if that's what you want, there is already a setting for that - first option in the config settings.1 point
-
1 point
-
Check this: in the .htaccess the "RewriteBase" ... should be "/" in site/config.php the $config->httpHosts entries ... is the url entered correctly in site/config.php set the $config->debug to "true" to get further error messages1 point
-
Hello, yes, it's called ImportPagesCSV: https://processwire.com/modules/import-pages-csv/1 point
-
@patrick, try this: $wire->addHookAfter('MarkupHTMLPurifier::initConfig', function(HookEvent $event) { $settings = $event->arguments(0); $settings->set('HTML.Doctype', 'HTML 4.01 Transitional'); }); For this to take effect you'll also need to clear the HTML Purifier cache which you can do by executing the following once (the Tracy Debugger console is useful for this sort of thing): $purifier = new MarkupHTMLPurifier(); $purifier->clearCache();1 point
-
Update 2022 Custom backend design is very easy now! See https://github.com/baumrock/AdminStyleHello (waiting for a PR to be merged) Continuous Integration is very easy now using https://github.com/baumrock/RockMigrations Data Listing is possible using RockGrid (commercial module, PM me if interested)1 point
-
Hi @fruid - sorry to hear about this! Could you send me the PHP file to have a look at it? Also let me know your PW, PHP and MySQL versions and i'll take a look. You never know, something could have changed with the PW version or PHP 8, and we need to make sure this module keeps working! - Marc1 point
-
In the context of CKEditor the <br /> tag is probably caused by the CKEditor settings rather than HTML Purifier. Using this answer as a reference, you could put the following in /site/modules/InputfieldCKEditor/config.js: // When CKEditor instance ready CKEDITOR.on('instanceReady', function(event) { // Output self-closing tags the HTML5 way, like <br> event.editor.dataProcessor.writer.selfClosingEnd = '>'; });1 point
-
1 point
-
A quick update... Version 1.2.5 allows you to deactivate url hooks and fallback into the legacy ProcessPageView::pageNotFound behavior. That's now possible in the module config. I discovered, embarrassingly just after the release of the new version 1.2.4, a case where switching to the URL hook actually causes a breaking change. In all tests before this was not noticed, so sorry if anyone discovered something similar. Now, in any case, it is easy to switch back to the old hook. Now to the problem: Maybe someone reading this has some deeper insight and can help me to understand the issue. I have a page on which I have included @Wanze`s SeoMaestro field and wanted to read the values from it via Api: <?php $page = wire('pages')->get('/'); if ($page->template->hasField('seo')) { $seoString = @$page->seo->render(); } That actually works fine when it's done in an ProcessPageView::pageNotFound hook. But if I use a url hook and call it, the seo->render() call will throw the following error: { "error": "Method Page::localUrl does not exist or is not callable in this context", "devmessage": { "class": "ProcessWire\\WireException", "code": 0, "message": "Method Page::localUrl does not exist or is not callable in this context", "location": "\/processwire\/wire\/core\/Wire.php", "line": 564 } } I've managed to step through the code and find out the source of the exception. It's a call of page->localUrl in SeoMaestro's PageFieldValue class: https://github.com/wanze/SeoMaestro/blob/master/src/PageFieldValue.php#L158 Any ideas? ?1 point
-
Hi @Sonia Margollé, I have now released version 004. It updates the fieldtype order schema to include details of selected shipping rate name and delivery times. This is also now displayed in the GUI when viewing a single order as per the screenshot below: Please grab the latest version and test. Please let me know if you have any questions. Thanks.1 point
-
Hi @nbcommunication! First of all, thanks for this awesome module! I'm a user of PageimageSrcset too! I was wondering, how do you handle when webp's are larger in size than the original jpegs?? This happens to me far more often than I'd like to and sometimes it's more than double the size of the jpg image ? I went ahead and set useUrlOnSize option to true, though the source type attribute then it's kinda wrong although it seems to work just fine! Anyway, just wondering if you had come across a similar issue. Maybe it's worth being able to set the webp options in the render method?1 point
-
@nbcommunication Thanks for this module. But I'm having a hard time to understand how to implement srcset in my websites. I have been using PIA (Pageimage assistant) to serve images with fixed width and then using Bootstrap 'image-fluid' class to fit the image. I have been experimenting with your module: I have 2 Mac laptops (a new MBA M1, and an old MBP no retina), using defaults rules (320, 640, 768x480 960w, 1024, 2048 2x). 1.- When I inspect the served images I get the same image in both laptops, in my understanding I should get different images based on pixel density of the device. 2.- Served images end up being bigger. for example, I have this blog section: In this layout, every image is 320 * 200 px (weight 21 kb), but the image being serve is 2048 * 1365 px (weight 438 kb) it fits beause it has width: 100% in CSS. So the question is, what benefit has the user in this scenario? Or I'm doing wrong?1 point
-
@benbyf I see… I guess you'll have to wait for an answer from @Sebi for this one That's right actually, I just checked the source, apparently there is no way to access the API without an API Key. The `auth` option only says, if a guest is allowed to access the endpoint. What's holding you back to use an API Key? I think the way to do it is to generate a new API Key for the new version. As soon as the client for the new version is released you can delete the old version. The clients which are still on the old version will get an Error like "API Key not valid" or similar which you can use in your client to guide the user to do whatever you want from there ?1 point
-
@benbyf I'm going to try to give you some answers: What do you mean by „the log wasn't created for this module"? Can you clarify your question a bit? You can disable auth for certain routes by setting `"auth" => false` in the route options. This is not explicitly documented at the moment, but here is an example where it's set to true: https://github.com/Sebiworld/AppApi#example-listing-users Version numbers are a way to make breaking changes to your API and check for that in the client (e.g. if the client requests API v1 but the newer v2 should be used you can return a warning which the client displays to the user (e.g. to update the software, refresh the website, …) API Keys are way to guard your API to only be accessed by your apps. This is not possible in the browser, since the code would be readable but certainly for complied Apps If you want to restrict API access of certain user roles (`superadmin` is allowed more than `editor`) you'll have to add this logic by yourself in the route methods (it's basically ProcessWire API from there)1 point
-
Yeah, i haven't found any way to do repeatable content yet, but it could be possible to roll your own multiplier field using text inputs and some javascript. If i get around to that i will post how it is done..1 point
-
My personal opinion is that database layers like dibi tend to make some things a little easier while making corner cases complicated and taking clarity away by re-using existing keywords in a sometimes non-intuitive way. Then, they don't support application features like PW's multi-language fields or status flags, so one has to reign in expectations. And, often overlooked, PW already has a nice extension to the DB layer in the DatabaseQuery* classes. Perhaps that should be put into the spotlight a bit more (and added to the API docs)? A working example: <?php $q = new DatabaseQuerySelect(); $result = $q->select('templates.name') ->select('count(*) as inuse') ->from('pages') ->join('templates on templates.id = pages.templates_id') ->where('templates.name != :tplname') ->groupby('templates.name') ->bindValue(':tplname', 'admin') ->execute(); echo $q->getQuery() . PHP_EOL; foreach($result->fetchAll(\PDO::FETCH_ASSOC) as $row) { echo $row["name"] . " => " . $row["inuse"] . PHP_EOL; }1 point