Jump to content

LostKobrakai

PW-Moderators
  • Posts

    4,956
  • Joined

  • Last visited

  • Days Won

    100

Everything posted by LostKobrakai

  1. Sure, I don't want to invalidate this, but the perceived feel of speed is totally drawn away by those empty boxes. Especially if I compare that to how my photography website loads on second visits. It's a blink and the images are there. I totally see why one wouldn't want to load all images before they are actually visible, but on the other hand why wait for loading images if it's not blocking anything. All other things which load initially are available in a breeze.
  2. Grad that you like it. The page you linked is only a redirect and it's working for me right now. Not sure what could've caused this.
  3. While the pages are quite fast I noticed that I get a lot of "blank" image containers initially and on every page load. Seems like lazy-loading prevents cached images from being displayed, as they display quite fast as soon as I stop scrolling. For this few images I would really think if it's worth to have lazy loading for the thumbs. These blank containers really make the loading feel slow here, even though it's the opposite.
  4. They are essentially the same. The latter one is just a convenience function which does also just use php's count().
  5. These sound very much like ckeditor specific issues. That thing isn't really meant to build whole galleries of images, but to manage text / image content. You would maybe have a better time rendering the images with the api in an automated fashion.
  6. 2.5.3 is not the latest version. We're at 2.6.1 for the stable release, where this bug is fixed. If for some reason you don't want to update the installation, which I would much rather suggest, you could also try to recreate the field and set it up with disabled multi-language descriptions before adding anything to it. As soon as an image is added before this setting was enabled it's never going back to using a single description.
  7. About what a range of "many" are you talking. There are a few limits you could hit when submitting forms, depending on the numbers we are talking about.
  8. What are the access setting for the mentioned 'gallery' field?
  9. I posted an PR which fixes the issue. Currently the core doesn't save the string value before checking by "title" and overwriting the string. The next check for possible "value" matches failed therefore. https://github.com/ryancramerdesign/ProcessWire/pull/1226
  10. In the field settings of the textarea under Details -> Content Type.
  11. I've set it up via the field settings and the line looks exactly like in your screenshot (though the yes/no example wasn't mine). And yeah $job is a page. It's directly from an project I'm working on.
  12. @BernhardB In this case checking for the template should be enough as everything you navigate to in the backend is most likely a process module with the admin template (I'm not aware of any exceptions). It's only if you call pages by the api where you need to check by has_parent. E.g. when you edit an user the users page is of the template user, but the rendered page is actually an admin template with the module ProcessUser running. So you're not accessing other templates directly, but through process modules.
  13. The problem is that most of those fieldtypes do load all the options ahead of time, which can easily time out with this number of pages. FieldtypeAutocomplete loads pages via AJAX not before the first two letters are entered into the inputfield, so this could be an option if the editors know their tags at least partly.
  14. You can simply answer that question. Files are uploaded via AJAX requests and then it's a matter of which file is finished faster. That has nothing to do with naming and I don't know if this "automatic sorting" could be changed. The AJAX requests most likely don't even know that other files are uploaded at the same time. What is doable is a sorting afterwards, either by javascript on user interaction (sort button) or with a module like I suggested above.
  15. Please have a look at my edited post above for the answer.
  16. Just to make it clear, is the move action visible and just the trash one missing or are both not visible? A little more peaking into ProcessPageList revealed, that the trash shortcut on move is only available to superusers (see here). I think that may be because only superusers can see the Trash, therefore other roles cannot "move" a page to the trash.
  17. Does it work in the page edit screen to delete the page? The "move" action is actually dependent on other things as well (like multiple children, sortability, ...).
  18. If $this->page is a NullPage then $event->arguments(0); should give you the page, which just wasn't viewable (See here).
  19. Image fields are mostly meant to be storage of files, so there's still nothing to automatically sort images for the backend (api can sort them). But you can use a module like this to sort the images with the api before saving a page: https://processwire-recipes.com/recipes/extending-page-save-process/
  20. I think you didn't understand what I tried to describe. HTML attributes are two parts: attribute="value". You can only allow predefined values for classes and styles ( with () and {}). You cannot do that for other attributes, like in your case id. You can only allow the whole attribute without restricting the value. *[id] (id in literally these two characters, not as replacement) does allow id's for any element and any actual id value. Kinda like this: <* id="*"></*>
  21. Everyone with template access "edit" can also delete the same page, as long as their role does also have page-delete. To differ between page-edit and page-delete on a per template basis you would need to use two different roles (role-edit, role-delete) so you can handle them independent of each other.
  22. Sure. You're still trying to render the same page that lead to the pageNotFound. It a unending loop this way. You need to render something that's not throwing a 404. return $this->page->yourPageFieldToEnglish->render();
  23. Something like this // in modules init() $this->addHookBefore('ProcessPageView::pageNotFound', $this, 'redirectToEnglish'); public function redirectToEnglish($event){ if($this->page instanceof Page && $this->page->is("template.name^=article_")){ $this->session->redirect($this->page->pageField->url); } }
  24. I don't know if you read the documentation for "Allowed Content Rules", but there it states that [] are for attributes, {} for styles and () for classes. Therefore you need to use *[id] to allow id's. You can only allow/disallow specific contents for the style and class attribute. All the other attributes (including id) are either allowed in any form or not. Edit: Your version would allow for this: <a centre="something" gras="green" noir="dark" credit="given">I'm a link</a>
  25. If that's the case then there's a bug somewhere, because it's not working for me if I use values. $job->of(false); $job->bp_jobstatus = "archive"; $job->save("bp_jobstatus"); $job->of(true); var_dump($job->bp_jobstatus->value); $field = $fields->get("bp_jobstatus"); $options = $field->type->getOptions($field); var_dump($options->explode(array("id", "value", "title"))); Outputs this: null array (size=7) … 6 => array (size=3) 'id' => int 6 'value' => string 'archive' (length=7) 'title' => string 'Archiv' (length=6) … An this php error message: Warning: Illegal offset type in /Users/Benni/Projekte/A-03-2015_made_full/03_Programmierung/www/wire/modules/Fieldtype/FieldtypeOptions/SelectableOptionManager.php on line 132
×
×
  • Create New...