Jump to content

Soma

Moderators
  • Posts

    6,798
  • Joined

  • Last visited

  • Days Won

    158

Everything posted by Soma

  1. Memory? If Images are a little bigger it can require a great amount of memory real quick to create the thumb.
  2. RT @alexmercenary: a lot of love from the @processwire community today! much respect.

  3. There's no problem with inputfields just creating a from a dummy pages's inputfields , won't work cause its not a existing page.
  4. You really press hard the refesh. From how it looks there's a problem with the form.
  5. I'm not sure I can follow what you're doing but there was no change I'm aware of. For example this $templ = $templates->get("block-page"); $form = $modules->InputfieldForm; $p = new Page(); $p->template = $templ; foreach($p->getInputfields() as $f) $form->add($f); $content .= $form->render(); ... creates an error ever since in earlier pw2.4 up until latest dev. This for example doesn't give an error for all PW versions: $templ = $templates->get("block-page"); $form = $modules->InputfieldForm; $p = new Page(); $p->template = $templ; foreach($p->fields as $f){ $form->add($f->getInputfield($p)); } $content .= $form->render(); Well not sure I can give a better way since you "just" have to build a form with inputfields and create a page later if there's files (in theory). Well if there's file uploads it makes it a lot harder to figure it all out cause you can't use backend ajax upload etc. but the inputfield file is designed for backend.
  6. What is the code you're using here? This was always like this, you first have to create and save a page before you can add files to it. I get that error in all PW versions. I think it also depends a lot how you setup things with the form creation and inputfields, for example $page->getInputfields() PW will try to create get inputfields in context of a page and if there's file fields it requires a saved page with an ID.
  7. Happy new year eveone!
  8. Alternate language fields work just fine for files and images.
  9. A better way? There's no other way than search for them, but to scale you'd maybe use a limit. Also maybe make that optional. Well if you have 50 tags and 1000 pages you'll end up 50'000 pages or even more (since pages can have multiple tags) and it will make 50 finds! It may work but take some time and memory.
  10. @z Thanks for getting back and glad you found the issue. I think you'll run into many problem with 32mb real quick so I don't think setting memory limit in modules is a good way as it belong to server configuration. ----------- Note about an update to 2.1.6 - Fixed issue with an unexpected "\n" char in a summary of a newly added module that caused and error with jQueryDataTables parsing the json. So I'm sure many will run into this issue once they hit refresh and haven't updated to 2.1.6 yet. But see and make an update of ModulesManager you'd need to hit refresh. - So not sure how this will play out. Damn "\n"! In case just manually update or use the core module manager.
  11. What if I have thousands of pages and more? I think it could give you some problems with performance real quick // get pages as PageArray $tags = $this->pages->find($tagsSelector); // register back references / "tagged" pages and count foreach ($tags as $tag) { $tagged = $this->pages->find("{$tagField}={$tag},{$backRefSelector}"); // pages tagged / referenced to this tag $tag->set('use', $tagged); $tag->set('useCount', $tagged->count()); } All pages are searched for each tag and even cached/stored. At least use a count instead of find $this->pages->count("{$tagField}={$tag},{$backRefSelector}");
  12. RT @henningheyne: How to create a translation file (json) in #processwire on Vimeo http://t.co/kPRabsQkqJ

  13. In the admin we have an option to set a sorting for children using one field only. I have a problem with children getting sorted randomly when using a date field that is the same for multiple children. Usually we would sort by date and by ID or title, but we are only allowed to specify one field at a time. The problem with this is that once you edit one of those children, the sorting is randomly changed (actually everytime you edit a children) That's not really nice and very confusing. I had to use a dirty hook to change the children sorting one parent manually. $this->addHookBefore("ProcessPageList::find", $this, "sortingChildren"); public function sortingChildren(HookEvent $event){ $sel = $event->arguments("selectorString"); $page = $event->arguments("page"); if($page->template == "news-category"){ $event->setArgument("selectorString", $sel . ",sort=-datetime, sort=-id"); } } Maybe there's already a way I don't know or a module? But then I think this should be in core of course and not a module. Thanks.
  14. I'm not sure I understand, but this module doesn't duplicate anything, so I'd guess it must be you.
  15. @mike 1. It's not possible to add a extra link as overview like you mention. This module parses your tree and needs physical pages to work with. If you really need this you have to build a page for it or use javascript to add the overview link to the list (I'm doing this in one project). 2. The parent of the active entry will get the class as defined in option "parent_class" so default is <li class="parent"> It's all documented here http://modules.processwire.com/modules/markup-simple-navigation/ This module adds classes to li's and not anchors for a good reason as that is much more flexible. There's no option to change that. So if you need such special cases you're up to use javascript. Or us php str_replace() to replace something on the returned markup. Let's see if you want to change class="parent" for parent li's you'd maybe do this $markup = $nav->render($options); $markup = str_replace("<li class='parent'", "<li data-current", $markup); Also there's some method to hook into and change things on items or lists, there's plenty examples in this thread and in the doc.
  16. @pwired, there's no way to track that via a client side webdev tool like firebug or any other, it's just not possible (seems logical). You need to search on filesystem either directly on server via grep command or download all files locally and use some search provided by a IDE or Code editor like sublime text.
  17. RT @processwire: New blog post: Wrapping up the comments upgrades, ProcessWire 2.5.11: https://t.co/KUAd0cXcJD – Added up/down voting & Com…

  18. 2.3 is very old and surely there's bugs, but not sure it's fixed completely and it really has to do with clone tool. There was a attempt to fix issue with it, but I got a coworker running into it where this fix was in place already so it's a mistery.
  19. What PW version? That's why I'm not using clone tool. But see others using it all the time. This bug is not something you'll recognize unless you use has_parent, and I think there's lots of PW sites where this happens and nobody recognized it yet. It's that the parents table is broken for those. It's annoying cause once you stumble over it you have no idea whats happening, or you don't even will ever notice that some pages may not get returned.
  20. It a bug known since a long time, but Ryan can't reproduce it. I got caught by it years ago, and recently it happened to 3 other people. Can you tell what you did to those pages? Move around, clone? https://github.com/ryancramerdesign/ProcessWire/issues/404
  21. You have moved those pages around from amother parent? Move those out of the parent and then back in. Works?
×
×
  • Create New...