gmclelland

Members
  • Content count

    296
  • Joined

  • Last visited

Community Reputation

174 Excellent

About gmclelland

  • Rank
    Sr. Member

Recent Profile Visitors

2,036 profile views
  1. @justb3a I was able to fix this module to work with the latest version of TemplateEngineTwig by modifying TwigExtensions/composer.json to: { "require": { "twig/extensions": "~1.5", "twig/twig": "~1.35" } } and then run composer update. Twig also gets installed when composer install is ran because it is a dependency of Twig Extensions Library. So anytime the TemplateEngineTwig module updates it's version of Twig, this module will also need it's version to match. Here's the pull request. https://github.com/justb3a/processwire-twigextensions/pull/11 I think we also should remove the debug extension. That's included in the TemplateEngineTwig module now. See https://github.com/wanze/TemplateEngineTwig/commit/776d3d8b3cf2fd04ea584d92fdc33e214468996b#diff-174a5e0bac30f021aa66bb8899550f87R55 I'll try to create a pull request for this fix as well. Hope that helps!
  2. @V7dev make sure you're using the versions I specified above. If you use all the latest versions of the modules, you will run into the errors.
  3. @V7dev - Twig Extensions module seems to work fine with Template Engine Factory 1.1.3 and Template Engine Twig 1.0.4 Hopefully @justb3a can take a look some time soon to see why it's not working with Template Engine Twig 1.1.0? I'm still trying to figure it out, but I'm not making much progress.
  4. Strangely, I tried updating the module with the ProcessWireUpgrade module, but it gave me an error "Session: Invalid download URL specified." It might have been because I originally downloaded the module from github. The text looks good now, it's no longer cut off. Thanks Robin!
  5. The problem with the core implementation is that isn't immediately discoverable that you can click the image's filename and rename it whereas your solution make's it obvious with a label "Rename / Replace." Most content editors aren't very technical savvy. Ah..Forgot about that one. Thanks I tried to take a look at tonight, but it looks a little more involved to get it just right across the different themes. I think the cutoff text is due to the negative margins. I'll investigate some more the next chance I get. I'm running Chrome on a mac with the latest version of Processwire and AOS.
  6. That's a great solution! Thanks Robin for providing this module. I just installed it and noticed a minor issue: See how the "R" in Rename and Replace gets cutoff? Do you plan on adding it to the Modules directory? It would make it easier to upgrade. It would also be cool if you made a similar module to handle image fields the same way. Maybe with an option to disable core's "click the filename to rename" feature and the drag and drop on thumbnail to swap the image? That way file and image fields are consistently the same and the "Rename / Replace" feature would be controlled by a permission both for image and file fields. I doubt many people know of those features any way? Drag and drop an image on a thumbnail could be considered a destructive action that may not be the intended behavior of the user? An easy way to disable the rename of the filename feature could be to remove the contenteditable attribute? I'm in hurry right now, but I just wanted to share the few thoughts I had. Thanks again
  7. Great job @adrian! I'm just confirming that the update did get rid of the error I was seeing. I like the new enhancements and how the image is displayed. What do you think about the thumbnail linking to the original file?
  8. Hi Adrian, Just upgraded to the latest version and noticed an error in the "Request Info" panel: ErrorException: Trying to get property of non-object in /Users/glenn/websites/mysite/wwwroot/site/assets/cache/FileCompiler/site/modules/TracyDebugger/panels/RequestInfoPanel.php:643 Stack trace: #0 /Users/glenn/websites/mysite/wwwroot/site/assets/cache/FileCompiler/site/modules/TracyDebugger/panels/RequestInfoPanel.php(643): Tracy\Bar->Tracy\{closure}(8, 'Trying to get p...', '/Users/glenn/we...', 643, Array) #1 /Users/glenn/websites/mysite/wwwroot/site/assets/cache/FileCompiler/site/modules/TracyDebugger/panels/RequestInfoPanel.php(458): RequestInfoPanel->getFieldArray(Object(ProcessWire\Page), Object(ProcessWire\Field)) #2 /Users/glenn/websites/mysite/wwwroot/site/assets/cache/FileCompiler/site/modules/TracyDebugger/tracy-master/src/Tracy/Bar.php(159): RequestInfoPanel->getPanel() #3 /Users/glenn/websites/mysite/wwwroot/site/assets/cache/FileCompiler/site/modules/TracyDebugger/tracy-master/src/Tracy/Bar.php(108): Tracy\Bar->renderPanels() #4 /Users/glenn/websites/mysite/wwwroot/site/assets/cache/FileCompiler/site/modules/TracyDebugger/tracy-master/src/Tracy/Debugger.php(293): Tracy\Bar->render() #5 [internal function]: Tracy\Debugger::shutdownHandler() #6 {main} I tried refreshing the modules but it didn't make any difference. ProcessWire: 3.0.98 PHP: 7.1.12 Webserver: Apache/2.4.29 (Unix) MySQL: 5.7.10-log
  9. Thanks @Wanze, I haven't ran into any issues so far, but that's good to know. The only thing I'm currently stuck on right now is trying to figure out how to get the TwigExtensions module to work with the latest versions of TemplateEngineTwig. It was working previously before TemplateEngineTwig 1.1.0. Any help testing is appreciated. Are you using TwigExtensions library at all in your projects? If not, don't you need the date functions and text truncating functions? After I get my sites upgraded to the latest version of TemplateEngineFactory and TemplateEngineTwig, I can start checking into a possible bug I think I see with the new changes to handle Wire404Exception. Side note: I really appreciate the work you've done on this module. To me it is so much cleaner looking at Twig code than looking at a php mixed with html. I like that in Processwire, I can simply build up my variables in the template to be sent to the view. That way my views(Twig files) are very simple and contain simple logic only.
  10. Nevermind. Rookie mistake. I just needed to check if the post.template == "calendar-posting" before trying to access post.event_description.
  11. I have two templates: basic-page title body calendar-posting title event_description I'm trying to build a search page that can search for text in any of those fields. Right now my selector looks like "title|body|event_description*=support, limit=3". It correctly returns a Page Array when I perform a search. I can output the page's title just fine, but the problem happens when I try to output the event_description field. I get the following error: User Error Exception: An exception has been thrown during the rendering of a template ("Method Page::event_description does not exist or is not callable in this context") in "search.twig" at line 50. (in /Users/glenn/websites/mysite/wwwroot/site/assets/cache/FileCompiler/site/modules/TemplateEngineTwig/TemplateEngineTwig.module line 110) Note: I am using the TemplateEngineTwig and TemplateEngineFactory modules. In my search.twig {% for post in paginated_items %} <article class="card post"> <div class="card-section"> <h3> <a href="{{ post.url }}" title="{{ post.title }}">{{ post.title }}</a> </h3> <div class="meta"> <p>{% if post.editable() %} <a href="{{ config.urls('admin') }}page/edit/?id={{ post.id }}">Edit</a> {% endif %} </p> </div> {% if post.event_description %} <div class="post-content">{{ post.event_description|striptags('<style>')|truncate(440, false, "...") }} <a class="read-more" href="{{ post.url }}" title="{{ post.title }}">{{ 'Read More' }}</a> </div> {% endif %} </div><!-- card-section --> </article> {% endfor %} Anyone have any ideas as to what could be the cause? If the returned PageArray from my find returns two items, I should be able to access and output any of those page's fields right?
  12. Although Drupal specific, https://www.chapterthree.com/blog/slice-template this explains the concept of page slices. "It’s a design structure that enables site authors to create web pages out of modular, horizontal components that span the width of the browser." Basically I was just wondering if what you were making would allow an editor to build these page slices that contain columns that contain components/widgets?
  13. In my comment, I was referring to something like this: See how the row background spans all the way to the edge of the screen? Some people call these page slices. In the example image there is two page slices that each contain their own columns. One has a white background the other has a grey background.
  14. Thanks for sharing your video @Jonathan Lahijani! In case your interested, I added your technique to my "Techniques for flexible page layouts in Processwire" document https://docs.google.com/document/d/1peY-FUpevKgy87cKOxIVz8jwcv2-3c61zbiJr3QKO6c/edit?usp=sharing
  15. Great work @theo! I'm interested to see how this plays out. Will you be sharing the steps/code used to make this? I added your technique to my document "Techniques for flexible page layouts in Processwire" https://docs.google.com/document/d/1peY-FUpevKgy87cKOxIVz8jwcv2-3c61zbiJr3QKO6c/edit?usp=sharing. Will this also handle the case where you have full bleed rows with contained columns on the inside?