Jump to content

Moebius

Members
  • Posts

    24
  • Joined

  • Last visited

Posts posted by Moebius

  1. Here is situation.

    I have multilanguage web site, e.g. default lanugage plus 2 additional languages.
    I created all pages and fill content currently only for default language. So now I have 3 very similar URLs, for example for page with title About us:

    • /about-us
    • /de/about-us
    • /fr/about-us

    They all have same part "about-us" because the title of my default language page is: About us. And it's ok.

    Now, when I start with filling content for alternative languages, this url property (Settings > name) does not change unless I manually edit it.
    Basically when I change german title to "Über uns" and save it, name will not change to /de/uber-uns, it will remain as /de/about-us

    I understand that it's desireable from SEO point of view, but during initial dev process I would like to force it to change it based on current language title.
    Is it possible, did I miss something obvious?

  2. I have situation like this.

    Page 1:
    https/www.domain.com/some_non_processwire_page.php
    This page is out of my scope and it set some PHP session, e.g. $_SESSION['something']
    There is no way that I can bootstrap PW in this page, I must leave $_SESSION['something'] as it is, so there is no option to bootstrap & and convert it to $session->something

    Page 2:
    https/www.domain.com/some-pw-page
    This is normal PW templated page, full under my control.

    I need to read $_SESSION['something'] from there.
    I know PW has it's own $session object, but as I staed beofre, I can't bootstap PW from some_non_processwire_page.php and then do stuff only with PW $session

    Is there any possible way that I can read $_SESSION['something'] from https/www.domain.com/some-pw-page

    I found some topics about session here on forum, but none of this answers is solution for my situation.
     

  3. I'm trying to build custom form (module) and I want to make text fields multilanguage as they are in normal Processwire environment.

    This is some of code I have:

    <?php 
    
        $form = $this->modules->get('InputfieldForm');
    
        $field = $this->modules->get('InputfieldText');
        $field->label = 'Title';
        $field->name = 'title';
        $field->columnWidth = 100;
        $field->required = 1;
        $fieldset->add($field);
    
        $form->add($fieldset);
    
        return $form->render();
    ?>

     

    This is what I got:

    1.jpg.54ee72fee0dbe61bbca834173dabb806.jpg

     

    And this is what I want - with language switch at top:

    2.jpg.a985134321ff3c6b7d6a4a3ef66e90da.jpg

     

    Is it possible to accomplish with API?

     

  4. I need to sort results by title ascending, and title includes special characters (croatian letters).

    The problem is that results are sorted but not 100% correct:

    e.g.

    $authors = $pages->find("template=author,sort=title");
    • Cavali
    • Cavilon
    • Čavlović
    • Cesare
    • ...

    You see intruder (bolded), it looks like sort engine treats letters C and Č as same ones.
    I'm not sure that this is Processwire related, but maybe API has solution for this kind of behavior?

    I have UTF-8 page content type .

     

     

     

  5. I'm having problem with setting global session variable in $config->ajax block.

    To be more clear, here is example:

    This will not work:

    if($config->ajax) {
    $_SESSION["TEST"] = "test"
    }
    

    and then after "normal " page rendering with no ajax I get nothing when trying to get session variable:

    echo($_SESSION["TEST"]); // produces no output
    

    however, if I set variable outside $config->ajax block:

    if($config->ajax) {
    // this is left blank to better describe context
    } else {
    $_SESSION["TEST"] = "test";
    }
    

    and then after "normal " page rendering with no ajax -  I get what I expect:

    echo($_SESSION["TEST"]); // produces "test" as output.
    

    So, what I want is set some global session variable inside ajax call and then reuse it's value during any page reload.

    It's late and I probable miss something.

  6. >Please supply some more info e.g. are you using a cloud hosting ?

    I'm on shared hosting

    >Does it show up when you drag and drop an image from your computer into the admin (image field) ?

    error occures via drag and drop and classic old style browse button upload.

    >What happens if you instead ftp upload the image ?

    FTP works fine, I also set up 0777 on whole assets folder.

    >Turn on php debug and see what it comes up with.

    I did, but can't see nothing.

    Thanks for your reply.

  7. First off all, thank you for great CMS/CMF, I think the best out there according to my preferences.

    I have some issues while using image field type for uploading. I'm receiving 403 Forbidden, You don't have permission to access /processwire/backend/page/edit/ on this server.

    Screenshot with firebug visualization:

    post-3346-0-14707300-1430692923_thumb.jp

    I found some topics here (#1, #2), but none of them solve my issue.

    phpinfo() does not indicate there is mod_security installed.

    It also looks like getPhpFilesAjax from wire/core/WireUpload.php never executes and error pops somewhere before that.

    It looks like this could be some hosthing restriction but I don't know what kind and how to address this problem to their support.

    Can you please point me somwhere?

×
×
  • Create New...