Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 04/18/2022 in all areas

  1. Hello everyone! I'm using multi-language site, and if I save the page with title and name only on non-English language, the error appears. I need to hook into some function which applies immediately when I click "Save" so that I can fill the title on English language. Can you please tell the name of this function or give a clue?
    1 point
  2. You should be able to to that with $event->object->getPage() Quite whether this is the right place to hook, however, is another matter...
    1 point
  3. You may try to use the page saveReady hook in ready.php to do a check and conditionally correction. But this would also be called / applied when everything is ok. Or, if you want to have a more optimized solution, you can check the possible involved methods : A search in the wire folder shows me this above result, where I would first check the ProcessPageEdit module, but don't know really.
    1 point
  4. An interesting problem, but I'm fairly sure there's no solution using PW selectors. As far as I can see you'd need to compare the tags for each project to those every other project, keep track of the results, and then sort by those results. You could get the data you need into an array quickly by using something like: $tagsForAllProjects = $pages->findRaw("template=project", "tags"); However, as you've probably realised, if you have many projects, it could take a long time to work though making the comparisons. Even though you only need to compare each pair of array items once (perhaps using array_intersect()), if I've got this right (which I might not have done!) it'd take n(n-1)/2 operations – so for 100 projects about 50,000 and for 1,000 the best part of half a million. But perhaps someone knows a better way.
    1 point
  5. Some of your questions will be answered by reading through the articles listed at https://processwire.com/docs/modules/, particularly the first three. Also really helpful are the Hello World example modules described in the blog post https://processwire.com/blog/posts/pw-3.0.181-hello/. And another excellent post is https://processwire.com/blog/posts/building-custom-admin-pages-with-process-modules/. These will probably give you enough to start building useful modules. And I'd suggest that building a module or two (especially by following examples) would be the best way to get started, working things out as needed.
    1 point
  6. What the hell are "outdoors" and "offline time"? I've never heard of this.
    1 point
  7. This error also happens with PHP 8. Modify line 707 $_timestamp = ''; to $_timestamp = null; Solve the error. Gideon
    1 point
  8. Regarding multi-language fields such as TextLanguage, TextareaLanguage, and PageTitleLanguage: When multi-language fields are shown in Page Edit mode, I often use them next to non-multi-language fields. That makes the page appear a bit disorganized and cluttered because multi-language fields vs non-multi-language fields don't align horizontally. The reason is that multi-language field have "language switcher tabs" that forces the field to "jump down" whereas normal fields stay in the normal position. See screenshot 1. It makes me sea sick! ? Suggested solution is to move the "language switcher tabs" up so that it aligns with the field label. See screenshot 2.
    1 point
×
×
  • Create New...