Jump to content


  • Content Count

  • Joined

  • Last visited

Everything posted by Jozsef

  1. Hi, I just ran into this issue with 3.0.61. I have has_parent as a sub selector for a page reference field. $categories = $pages->find("page_field=[has_parent=1234]"); It worked fine and at some point it stopped producing any results. It works if I move it out and do a two step filtering. The only thing I did was to import more pages via Ryan's Import CSV module. $parent = $pages->find("has_parent=1234); $categories = $pages->find("page_field=$parent"); @LostKobrakai, would you mind sharing your module for fixing the parents table? Thanks
  2. The same issue. Running PW 3.0.61 and Map Marker 2.0.6 worked just fine. After upgrading to 2.0.9 and entering my API key I get the above error to any address I try.
  3. Sorry for the late reply, it seems to improve things indeed. Thanks.
  4. Am I doing something wrong or some of you encountered the same issue? When using the simple navigation module it turns out that the site is loading every single visible and published pages in the page tree with every page request even though the max level is set to 1. Tracy debugger reported over 8000 pages loaded on the home page on a bigger site I made, no wonder it took 15+ seconds to load. I checked on other sites I made with similar results. I swapped the navigation over to a function on the above site and the site got lightning fast again, as I expect from ProcessWire. Is that an expected behaviour or am I doing something wrong? This is the code I used to output the navigation and had v1.3.3 installed: $treeMenu = $modules->get("MarkupSimpleNavigation"); // load the module $menuoptions = array('show_root' => true, 'max_levels' => 1, 'outer_tpl' => "<ul class='topnav clearfix'>||</ul>", 'inner_tpl' => "<ul class='subnav'>||</ul>"); echo $treeMenu->render($menuoptions); // render default menu
  5. I build my sites on top of my existing PW site profiles I take from previous sites too if you can consider that as a theme. My question is more from the commercial side of things. I find myself spending much more time with simple projects than others and that's why I was wondering what you guys think of alternatives. On freelancer forums people tend to see only WP but I know that most of you are seasoned developers coming from other systems.
  6. @Macrura, do you mean that you use PW with HTML themes?
  7. Hi everyone, I'd like to start a conversation about your view and practices for profitable web design and development (unless there is already one that I didn't find). I use ProcessWire for most of my sites currently. Wherever I look though I can see plenty of web design freelancers and even larger agencies running exclusively on WordPress and themes. Many people are running "web design" businesses even without any development skills. There are just so many that I started to doubt if that's the way to go. - Do you use Wordpress + themes to cut cost and increase your bottom line? If yes, what is the middle ground? Is it worth to put up with WP? - If not, what alternatives you use for micro/small businesses? - And finally, how do you use ProcessWire to speed up small, basic brochure websites? Clients care more about budget and results than "custom" design. I love working with ProcessWire but only if it doesn't mean lost opportunities. Any opinions are welcome, especially from those of you who are advocates for themes yet are skilled developers.
  8. Hi there, thanks for the great module. I installed it on PW 3.0.33 with PHP 5.4.45 and I get an error message: Fatal error: Call to undefined method stdClass::getIterator() in /home/funevents/public_html/site/assets/cache/FileCompiler/site/modules/TracyDebugger/panels/DebugModePanel.php on line 422 Is there something missing on my server? Thanks.
  9. Ok, here is a strange one running PW 3.0.33 on PHP 5.4.45 and have max image dimensions set up to resize images to 2000x2000 pixels on upload. Portrait mage upload results in a missing JSON response and the thumbnail just sitting there with 100% progress bar and the spinning wheel. I can upload landscape images but portrait ones trigger the error. I rotated a portrait image before upload and the same image was uploaded successfully then. I'm getting this error for portrait images in Chrome: Uncaught TypeError: Cannot read property 'length' of null at XMLHttpRequest.<anonymous> (InputfieldImage.min.js?v=119-1488236130:1) (anonymous) @ InputfieldImage.min.js?v=119-1488236130:1 in Safari: TypeError: null is not an object (evaluating 'aM.length') Any idea what's going on here? Thanks
  10. I am so busted… Apologies and learning as I go.
  11. Hi everyone, I'm using Fredi to let users add adverts to a site. It works fine for adding/editing pages but how can I get it to accept images uploaded in one step? The page must be saved first so the image is not saved when the user saves the page the first time. Any tips? Maybe a two step process? Tabs? I'm in the dark… I'm using this code that works great for adding the page, but how to hook into save the page before the user uploads an image? $fredi = $modules->get("Fredi"); $content .= $fredi->setText("Sell a dress")->setClass("link-button")->addPage("dress", "title|body|images|price|brand|colour|size|condition|length|style|contact|phone|email|county", $pages->get(1243));
  12. Hi everyone, I'm using Fredi to let users add advert to a site. It works fine for adding/editing pages but how can I get it to accept images uploaded in one step? The page must be saved first so the image is not saved when the user saves the page the first time. Any tips? Maybe a two step process? Tabs? I'm in the dark...
  13. @modifiedcontent, I'm sorry, as I mentioned I'm no expert when it comes to PHP and PW hooks. I hope someone can jump in to help you out.
  14. I'm no PHP or PW guru neither but this is how I see it (food for thought): You created a new input field but didn't make it part of the wire('fu') object – hence pwFoo's comment. So when you get to the wire('fu')->process(); your hook will be able to process your input field. This is what happens here: // Define the field before you call FU and add it as additional field... $fu->register(array('username', 'email', 'password', $myField)); I'm sure you will get there soon based on the example above.
  15. I was scratching my head for hours because I couldn't get the add default role plugin to work. It's probably only me who is so newbie at hooks. But anyway, just wanted to add here for those who have similar problems: (@pwFoo, you might want to add this extra line to the documentation ) Hooks must be added before the processing! I got my code working this way: // Add default user role $fu->addHookBefore('save', function($event) { $user = wire('fu')->userObj; $user->addRole('dress'); }); // Login after successful registration $fu->addHookAfter('save', function($event) { $user = $event->object->form->fhValue('username','text'); $pass = $event->object->form->fhValue('password','text'); $this->session->login($user, $pass); }); // process register / form submit $fu->process($redirectDestination); Thanks for the great module though, it saved me loads of time and it just works. The email validations is just the icing on the cake.
  16. I join to this question. On pages with large images or many images to be resized, the page load just take forever the first time (until the images got resized). I came from Drupal where the page still comes up immediately and the image loads later, as soon as it's resized. It was a bit of a shock in ProcessWire that image resizing holds back the whole page, especially that everything else is so well thought through. Any simple solutions to overcome this? (Resizing on upload, lazy loading etc).
  17. Thanks for the quick help. I was hoping that there was a built in method but a workaround like that will be the answer then. I read the blog, it explains a lot of situations but this.
  18. Normally I output some fields with fallback values as follows (with Headline field filled in in this case): $content .= "<h1>$page->get('headline|title')</h1>; How would you approach front page editing in the template for this (B/C/D method)? $content .= "<h1>$page->edit('headline|title')</h1>"; results in the Headline outputted but editing doesn't work. $content .= "<edit title>"; $content .= "<h1>{$page->get('headline|title')}</h1>"; $content .= "</edit>"; Results in the Headline outputted but double click will edit the Title field instead. Has anyone succeeded this way?
  19. Hi there, I'm helping my client with on-page SEO and realised that they uploaded a lot of randomly named images. Any suggestions on renaming those files without deleting + re-uploading the file? I educate my clients on the importance of the description field but many would find it difficult to rename a file on their computers before upload... Any workaround you can think of? Maybe using the API to mass rename all images based on their descriptions or page title? Thanks and I'm open to all suggestions (also on how you prevent filenames full of random characters)?
  20. Thanks Apeisa, I had to add $fredi = wire("modules")->get("Fredi") to the hannacode even though it was in the template file too. It works now.
  21. Hi, maybe someone tried this before me: Do you think I could get fredi working inside hannacode? I'm trying to use it as usual but I get an error message: Error: Call to a member function render() on a non-object $members = wire('pages')->find("parent=/members/, location=$office, include=hidden"); foreach ($members as $member) { echo $fredi->render('title|headline|mobile|mail', $member); Without the fredi code everything works as expected. Could anyone point me to the right direction? Obviously I must do something wrong. Thanks
  22. I'm more like a front and developer and I used Padloper for simple stores before. This time I was asked to build a website for a print shop with a few special requirements: - price list for each product that lists different quantities - options for paper quality, fold, etc that modifies the whole price list - file upload for each product to include artwork Do you think it is possible with Padloper and PW or you'd go different way? Which way you'd approach this? Also, are any of you available for custom module development? Thanks
  23. Is it possible to include the standard Directions button when rendering the map display? Has anyone implemented it already? It would prove invaluable.
  24. Using the following code in Hanna code always evaluates as TRUE: if ($page->id == "1187") { echo $page->id; } or if ($page == $pages->get("1187")) { echo $page->id; } returns true and prints out 1187 no matter what page I run the code on I should be able to use $page and $pages in Hanna code without problem or did I misunderstood something? Thanks
  • Create New...