Jump to content


  • Posts

  • Joined

  • Last visited

  • Days Won


Posts posted by dragan

  1. @mjut Please don't place your question in more than one place.

    I read both of your posts, but I'm still not sure about the whole scenario.

    On 3/19/2020 at 3:39 PM, mjut said:

    If I type www.url.com/title1 the page is being redirected to the default language – even if I previously did chose Danish as my language.

    Please define what "even if I previously did chose Danish" actually means. Where and how did that choice happen? Did you create a link that stores language preference in a cookie or session?

    On 3/19/2020 at 3:39 PM, mjut said:

    Is it possible, that the users prefered language is the redirct? Say, if I choose to view the page in Danish and type www.url.com/title1 I want the redirect to www.url.com/dk/title1 not to the default language.

    In your other post, you mentioned that visitors are coming to your site via QR codes. If you want people to see your Danish language content, then simply use your Danish language URL for the QR code, not the default one.

    There are many different strategies how to tackle such things, e.g. detect the user's browser default language and (if necessary) do a redirect. Or make the user click somewhere and store his/her preference in a cookie or session.

    From a usability point of view, you would create your landing page in a way that the users can quickly and intuitively switch language versions, if needed. The default PW multilang site profile has a nice commented working example (how to dynamically switch languages).

    Bottomline: If you did your homework re: information architecture / UX, no special technical "trickery" is needed. Just make sure your navigation and everything else (breadcrumbs...) in your site setup takes ML into account, and once the visitor is on "his/her" language version, they know how to get their respective language content.

  2. A work colleague has to find a new appartment till the end of March, because she got kicked out of the flat-share appt. The real-estate market is already unaffordable for most "normal" people in Zurich under "normal" circumstances. But findind something even halfway affordable in such a short period of time is crazy under such definitely-not-normal circumstances.

    • Sad 1
  3. Nice look and feel.

    If you allow just a few remarks:

    • On really large screens the main texts are too wide. I would either increase the font-size a bit, or define a max-width to make it more readable.
    • The color contrast is insufficient (way below 1:4.5) for most text. If you care about accessibility, I'd adjust the colors accordingly.
    • There's no h1 anywhere. And also no meta description. For SEO, I would also use a bit more text for <title> than just "Goldkinder".
    • Like 1
  4. Why don't you simply strip out the linebreaks with a simple str_replace?

    1 hour ago, kaz said:

    Therefore, no line breaks should be allowed in the textarea

    By definition, HTML textareas allow linebreaks and simple text inputs do not. You could change the input type to text input, but that would be hardly useable if you need 500 characters 🙂


  5. 9 minutes ago, picarica said:

    but all the css-transitions or css-animations don't work.

    ProcessWire doesn't care about any of your frontend-assets. It's your job as a developer to put it all together and get the expected output.

    Looking at your site, I noticed that all JS references are wrong, i.e. the paths to your Javascript files are incorrect and therefore don't load.

    My guess is that some of these "CSS animations" aren't pure CSS animations, but actually triggered by those (missing) JS files.

    Adjust your CSS + JS paths, and put them somewhere in site/templates/ and it will work as expected. You can use pre-configured paths like $config->paths->templates in your .php templates, which will also work regardless if you are developing on localhost or a remote server.

    • Like 2
  6. 1 hour ago, DavidBerlin said:

    Do i have to set language somewhere else other than html lang="de"?

    Well, that's in your HTML. PHP doesn't care about that, or even knows about it 🙂

    Set it somewhere in your template, at the top (if you have a multi-lang setup, you probably need to detect the user language first)

    or globally in site/config.php

    • Like 1
  7. Switzerland's government yesterday also announced new measures: Schools and public sport places (swimming pools etc.) will be closed, events with more than 100 people are forbidden. Probably for the first time in my life, I witnessed what panic buying and empty shelves look like in a nearby supermarket. I've previously only seen such stuff on TV.

    As for work... we try to avoid / postpone meetings and do telcos instead. And home-office is always an option (always was, up to a degree).

  8. Hi @kunago and welcome to the PW forum.

    I am not sure if you refer to the actual "page-edit" / backend-GUI scenario, but I guess you do.

    What you can do is to duplicate the original image, and then crop that duplicated image, and save it as a variation.

    Or do you want to have a custom preview of all images in the page-edit instance to be always "aspect ratio 1:2"? (thumbnails)

  9. Well, I just found processInputErrorAction() in ProcessPageEdit.module, but that is a non-hookable method. A related function seems to be

         * // Disable change tracking
         * $page->setTrackChanges(false);

    which is in wire/core/Wire.php

    I would maybe try to work with "Required only if custom PHP returns true" and add some logic like "required only if data is edited in the frontend", but I'm not even sure that's possible.

    A quick test with

    $isAdmin = $this->page->rootParent->id == 2;
    return !$isAdmin;

    seems to work... (thanks to @LostKobrakai's post here)

    • Like 1
  10. Well, frankly speaking, I don't quite see the issue here. Required is required, so some warning messages make sense. Why do you define certain fields as required in the first place?

    You can try to be creative with other kinds of setups / workflow, e.g. nothing is required initially (on save). But you could define some fields as required only once the page gets published. There are probably methods and hooks that let you do that, e.g. https://processwire.com/api/ref/pages/publish-ready/

    You could also "fake" a required field in the backend, e.g. use labels like "Phone*" and / or use a yellow background (UIKit field settings). In other words - make them look super-important for the users visually.

    Here's a rather old thread that is somewhat related: https://processwire.com/talk/topic/4476-validating-field-before-page-save/


  11. 30 minutes ago, neophron said:

    I know this link, but it doesn't exist right now 

    Well, that error message is unfortunately misleading. It should say something like "This board is only accessible if you have a paid Pro support license". When you buy a Pro module, you have access to the VIP forum for one year. After that, you have to sign up for a support plan (the module itself doesn't have an expiry date, of course), which is something like $25 / year, last time I checked.

  12. On a related note: Does anybody know what these random strings like 6450242531912981c3683cae88a32a66 are used for?

        "file": "site\/modules\/FormBuilder\/ProcessFormBuilder.module",
        "textdomain": "site--modules--formbuilder--processformbuilder-module",
        "translations": {
            "6450242531912981c3683cae88a32a66": {
                "text": "Formulare"
            "c9cc8cce247e49bae79f15173ce97354": {
                "text": "Speichern"

    (This short excerpt is from a generated translation file for Form Builder)

    Is this just for making sure you get a valid JSON and keeping key/values intact when you switch between PHP arrays and JSON? (keys)

  • Create New...