Jump to content

Zeka

Members
  • Posts

    1,065
  • Joined

  • Last visited

  • Days Won

    11

Everything posted by Zeka

  1. This commit https://github.com/processwire/processwire/commit/7d5cef5717ef3150297f87829f03f9c4df5fa725 brings some improvements to overrides in context of repeaters, so it's not an issue in your case as it was commited in 3.0.144 Worth to ckeck JS errors on home page and also check that you have your settings in page source
  2. @2hoch11 Make sure that there are no overrides on the second template on template field context.
  3. Thanks, I know it. The issue is that somehow it worked before update with this option checked.
  4. @Gadgetto Have you seen this? https://github.com/processwire/processwire/blob/dev/wire/core/FieldsTableTools.php#L108
  5. @adrian Hi. I'm facing a small issue and I'm not sure that this one is relative to Tracy, but I feel that it's better to ask anyway. I have quite a simple template that outputs page views based on the GET parameters. URL of this page is /ua/views/. The issue is that I have significant and unreasonable leap in memory usage The strange thing is that if I change URL ( page name) to something else like v or view I get (if not contains 'views') I have reviewed all the code and did not find anything where occurs 'views'. I don’t have any idea what can cause it, it's just some kind of mysticism, so I thought maybe it could be an issue with Tracy or Performance Panel. Thanks.
  6. You can read more about these two options here https://processwire.com/blog/posts/processwire-2.6.7-core-updates-and-more/ You can use config.php if you preffer (API is not ready), but I would go with ready.php and setting().
  7. @LAPS You can place it in ready.php or if you are using 'prependTemplateFile' option in config.php you can place it in _init.php or whatever you call it. https://github.com/processwire/processwire/blob/master/site-beginner/config.php#L40
  8. https://processwire.com/api/ref/functions/setting/
  9. @fuma255 You should put your query to the whitelist https://processwire.com/api/ref/wire-input/whitelist/, but I think that there are some other issue in your search logic. Could you show it to us?
  10. @ryan There is one more issue that I faced after the update. I'm using "Multiple templates or parents for users" and after update when I try to add new user with my custom template I get Can’t save page 0: /ua/authors/test/: Page using template “author” is not moveable. (Template::noMove) [/admin/access/users/ => /ua/authors/]
  11. Hi. I'm using Matrix field as a content builder. One of its type is "Embed code" that contain Textarea field where editors can insert embed code. I know that such an approach opens possibilities for vulnerabilities for and it's better to stick to Textformatter approach but for now editors don't want to change it. Sometime editors inset code like <Iframe src = "https://www.facebook.com/plugins/post.php?href ......" width = "500" height = "441" style = "border: none; overflow: hidden" scrolling = "no" frameborder = "0" allowTransparency = "true" allow = "encrypted-media"> </ iframe> As you can see there are some errors in it that cause that only part of the page is rendered because of HTML parsing errors. So my question is how would you handle such an approach? I was thinking to try to use purifier, but there will be a lot of work to configure it rightly, maybe there is an easier way that I don't think about how to validate HTML?
  12. @ryan It looks like there are some issues with InputfieldDatetime. I have to fields 'publish_from' and 'publish_until'. None of them are configurated to prefill today's date if empty, but after the update, if one of the fields has value second one is prefilled with its value. The second issue is that after page save I cannot change the selected value, it shows that the date is changed but after page save it still show the previous date. The third issue is that Date Picker options are not applied to the field. For example if I set Date Picker option to "No date/time picker" on the first field second one will also have no date/time picker. Looks like there is something wrong with js initialization and first field configuration is applied to all other date fields on the page edit screen. Tested on two different sites.
  13. Wow. Thank you Ryan. Great update.
  14. Not sure that you can modify edit URL in hook, but you can definitely override it in inherited class. Or just add custom method via hook and use it $wire->addHook("Page(template=your_template)::customEditURL", function(HookEvent $event){ return //// });
  15. @ryan There is an issue with jQuery Timepicker Addon. https://github.com/processwire/processwire-issues/issues/1088 We have 1.6.1 in the core, but the latest version is 1.6.3, so maybe it's good time to update. Thanks.
  16. I'm still mostly on Foundation, but use it more like Sass mixins library with custom classes based on BEM naming methodology and js plugins. There are several 'Cons' - jQuery dependency and uncertainty in further development as the project is maintained and developed by volunteers, there are not so many people from ZURB involved anymore, though there was first community-based release in December.
  17. The not direct answer, but maybe you can find something that suits your request at this thread
  18. @BitPoet Thanks for the info. I'm already on InnoDB. I have Redis and Memcached on the server, but to be honest I have never used them as it's my first project where I hit some limits where probably it is a good thing to think about it. Could you recommend some reading about it or show some simple example of usage?
  19. Hi. I will have more than 100k in the cache table. Most of theme are updated on a daily basis. Could there be some unobvious pitfalls of such intensive usage (at least for me)? Thanks, Eugene.
  20. @wesp You have to turn on URL segments on home page template and in your template file if (input()->urlSegment(1)) { $pagename = input()->urlSegment(1); $match = pages()->findOne("template=article-page, name={$pagename}"); if (!$match->id) throw new Wire404Exception(); echo $match->render(); return $this->halt(); }
  21. Hi. I'm looking for the right way to regenerate page cache when a page is saved or published so it has cached version when a user hit on the frontend. All that I can think about is to send get a request like: $this->wire->addHookAfter('Pages::saved(template=post), Pages::published(template=post)', $this, 'clearCacheFile'); public function clearCacheFile($event) { $page = $event->arguments[0]; $pages = $event->wire('pages'); .... if(count($clearPages)) { $this->wire('modules')->get('PageRender')->clearCacheFilePages($clearPages, $page); $this->message(sprintf($this->_('Cleared cache file for %d page(s)'), count($clearPages)), Notice::debug); } $http = new WireHttp(); $http->get($page->httpUrl); } But I'm not sure is that good way and what pitfalls it would have?
×
×
  • Create New...