Jump to content


  • Content Count

  • Joined

  • Last visited

Everything posted by titanium

  1. titanium


    No solution, but I guess there is definitely something broken. I'm getting error messages like the following on multiple servers of mine: Fatal error: Method SeoMaestro\PageFieldValue::__toString() must not throw an exception, caught ErrorException: chdir(): open_basedir restriction in effect. File(/var/www/php-fcgi-scripts/web366) is not within the allowed path(s) Somebody mentioned that earlier in this thread, but no solution was proposed (the error went away automagically in that case).
  2. Do you have to deal with animated image file formats that much? Google's WebP file size is on average25%-34% smaller compared to JPEG, see https://developers.google.com/speed/webp/docs/webp_study. But that doesn't mean it's always the format of choice. If GIF or APNG works better in some cases, nobody forces us to use WebP.
  3. Nice find! But I think it just cures the syndrome and to be honest, it's kind of dependency nightmare to create a generic css-file which patch problems of a certain module. The real pain is: ImageExtra does not pay attention to the new UIkit classes completely. I suggest the following: replace the $out in the method renderLinkItemField with: $out = '<div class="InputfieldImageEdit__additional--' . $name . '">' . '<label class="uk-form-label detail" for="' . $fieldName . '">' . $field->label . '</label>' . '<div class="InputfieldContent uk-form-controls" style="padding:0;">' . $field->render() . ' </div>' . '</div>'; Overall I think ImageExtra from @justb3a is still a great module, but it is somewhat dated and needs some love.
  4. This issue is solved, because the PR I submitted has now been accepted by @justb3a.
  5. I tried the latest version of this wonderful module today: I activated the module's config setting "Restrict from search results". After that, I logged in with a user who is restricted to a certain branch and tried to find some pages outside the restricted branch. I used the search box in the upper right corner of the PW admin and was surprised to see that results are found outside the restricted branch. The quoted sentence above is related to a search by Lister, I guess?
  6. Oh, I see, I wasn't precise enough. Sorry, I didn't think of that. I meant "Tracy with Force superusers into DEVELOPMENT mode activated instead of just "Tracy enabled". It's Tracy right out of the box (fresh install) with just "Force superusers into DEVELOPMENT mode" setting activated. The slowdown is more or less noticeable on all admin pages, "modules" was just a concrete example. But I do have to say I have some custom modules included in this project, so I will report back after I have done a vanilla install elsewhere and tested again. Thank you.
  7. I've written that already - with "Force superusers into DEVELOPMENT mode" activated, it takes nearly 6x times longer to load the modules page than without Tracy.
  8. Is it just me or has Tracy (current version) become very sloooow recently with the "Force superusers into DEVELOPMENT mode" setting activated? Benchmark - loading of the "modules" page: Tracy enabled: Loed 6.9 s Tracy disabled: Load 1.2 s Measured with Google Chrome Dev Tools. I don't remember noticing that before... 🤔
  9. @Zeka, thanks for the hint. I gave it a shot some minutes ago and it does not work either. I dived deeper now. /wire/core/Page.php contains a method $page->set($key, $value): case 'parent': case 'parent_id': if(is_object($value) && $value instanceof Page) { // ok $this->setParent($value); } else if($value && !$this->_parent && ($key == 'parent_id' || is_int($value) || (is_string($value) && ctype_digit("$value")))) { // store only parent ID so that parent is lazy loaded, // but only if parent hasn't already been previously loaded $this->_parent_id = (int) $value; } else if($value && (is_string($value) || is_int($value))) { $value = $this->_pages('get', $value); $this->setParent($value); } break; So there is definitely support for $page->set('parent', $id) here. Proof: the following works: $page->set('parent', 3); $page->save(); In the head of /wire/core/Page.php is a definition of $settings: /** * Page-specific settings which are either saved in pages table, or generated at runtime. * * @var array * */ protected $settings = array( 'id' => 0, 'name' => '', 'status' => 1, 'numChildren' => 0, 'sort' => -1, 'sortfield' => 'sort', 'modified_users_id' => 0, 'created_users_id' => 0, 'created' => 0, 'modified' => 0, 'published' => 0, ); I think 'parent' is missing here. I added it and tried again - now this works: $page->setAndSave('parent', 3); So I guess it's a bug.
  10. Thanks, @adrian. I always did what you described, but recently I wondered why $page->setAndSave('sort', 3); works, but $page->setAndSave('parent', 3); does not - both are native properties of the page. This seems somewhat equivalent to me, so they should behave the same, shouldn't they? But I'm not sure if I fully understand it. What I originally tried to achieve was to save the page with a maximum of performance, because I have to deal with a cron job which imports/changes thousands of pages. I guess I have to experiment with $page->save(['noFields' => true]). Any hints for optimized performance of page manipulation are welcome.
  11. I noticed that $page->setAndSave('parent', 1000); does not work. Reason is, that $page->save('parent') does not work either. In /wire/core/Page.php: public function save($field = null, array $options = array()) { if(is_array($field) && empty($options)) { $options = $field; $field = null; } if(!is_null($field)) { if($this->hasField($field)) { return $this->wire('pages')->saveField($this, $field, $options); } else if(is_string($field) && (isset($this->settings[$field]) || parent::get($field) !== null)) { $options['noFields'] = true; return $this->wire('pages')->save($this, $options); } else { return false; } } return $this->wire('pages')->save($this, $options); } "parent" is no field and no key in $this->settings[$field], so the functions must return false for $page->save('parent'). Possible keys in $this->settings[$field] seem to be: ["id"] ["name"] ["status"] ["numChildren"] ["sort"] ["sortfield"] ["modified_users_id"] ["created_users_id"] ["created"] ["modified"] ["published"] Why is parent missing here?
  12. Hi folks, I'm currently struggling with a client request. The client has created a lot of pages with employee profiles. Each profile has one or more email addresses assigned (currently this is accomplished by the ProFields Mutliplier module). Furthermore, there are content pages, which have a Repeater Matrix field. One repeater item is a page field which selects the employee profile. This works so far, but now the problem is: how can one of the email addresses of the profile be picked within the page field resp. repeater item? Only the email address which are assigned to the profile should be selectable. I haven't found an approach how to do this on the admin side yet and I'm grateful for any hints.
  13. You could try this setting in config.php: $config->defaultAdminTheme = 'AdminThemeUikit';
  14. Is there a property to set a "Return-Path:" which differentiates from the "From:" setting? At a first glance, I have found a method call $this->emailMessage->SetHeader('Return-Path', $address); inside WireMailSmtpAdaptor.php - I guess this can't be overridden individually?
  15. What you notice is the default behavior. I've never heard one of my users complain, but I think you have a point here. It would be better if this (just visually) "move" wouldn't take place. It's quite irritating and somewhat annoying one must reload the browser to be sure. I guess it's hard to fix, because the drag and drop move is made by JS, which isn't aware at that moment that some permissions shouldn't allow this.Maybe @ryan can re-think about it? I would be glad if you could fill in an issue report.
  16. There is a SEO module already. I guess it's not maintained anymore, but it can be a good base for extensions. What do you miss? Personally, I don't think a SEO module belongs to the core (if it's that what you have meant by "native"), because the core should keep it's clean and generic character. Keep in mind that ProcessWire is not just used for websites, and even a lot of websites don't need that much SEO.
  17. Hi folks, before I'm going to submit a bug report, I would like to make sure it's not my setup. Since commit bac60dc340d66766e7b9c0ce811a2ae152585123 I can't crop any png image (not by api, backend is meant, see screenshot). Could someone with ProcessWire 3.0.86 or 3.0.87 try this and report back here? Many thanks in advance!
  18. Given three pages with the following titles: Deutschland Österreich Schweiz I noticed that I get different results for a sort inside a selector and an explicit sort(). See the following example: // A) just use selector as usual $countries = $pages->find('parent=countries,sort=title'); foreach($countries as $country) { echo $country->title . "\n"; } // result: Deutschland, Österreich, Schweiz - ok // B) put pages in separate array and sort afterwards $countries = $pages->find('parent=countries'); $whitelist = new PageArray; foreach($countries as $country) { $whitelist->add($country); } $whitelist->sort('title'); foreach($whitelist as $country) { echo $country->title . "\n"; } // result: Deutschland, Schweiz, Österreich - huh? It seems to be obvious that it has something to do with the umlaut in Österreich. Maybe a bug?
  19. I once was a fan of slick too, but I do remember I had some problems with it - I wanted to build a fade transition and the images didn't cleanly cross-fade from a certain build on anymore (I think it was > version 1.5). I switched to Swiper (http://idangero.us/swiper/) since then.
  20. Since GitLab doesn't support simple basic auth, you're out of luck with "username:password@" in front of the url. But you can set the "private_token" parameter like this: https://mygitlabserver.com/myrepo/repository/master/archive.zip?private_token=2CEgvKCfrABgshElokZ3 The private token can be generated within the GitLab personal user settings. This should get you going: https://mygitlabserver.com/profile/personal_access_tokens - replace "mygitlabserver.com" with the url of your GitLab server.
  21. I'm very interested why foremost it's age is a good reason to turn away from jQuery. It's no new cool kid on the block, but it is matured, very well documented and wide spread. It was no "dead end" like some of the other "cool" JS frameworks have been. It feels like a good ol' companion. It's not the right tool for every job nor a holy grail, but in pretty much use cases it works well and affordable in a sense that there is no steep learning curve.
  22. Looks fine so far. What exactly does not work? Are there no projects in the output? Possibly the projects are hidden, in this case the selector looks like this: $pages->find("template=projects,include=hidden")
  23. Hi @mauricemoss, there's already a PR for this issue here: https://github.com/justb3a/processwire-imageextra/pull/30 I hope @justb3a takes it into account for her next release.
  24. As said before, I don't know Twig that much, but with PHP it's not that much uglier. PHP is a template language in itself, imho. Here's the equivalent (well, it should work ;-): <?php foreach ($page->exhibition_artist as $artist): ?> <?=$artist->title;?> <!-- Show works that are related to current exhibition and belong to a given artist --> <?php foreach ($pages->find("template=work, work_exhibition=$page->path, work_artist=$artist") as $work): ?> <?=$work->title;?> <?php endforeach;?> <?php endforeach;?>
  • Create New...