Jump to content

webaff

Members
  • Posts

    21
  • Joined

  • Last visited

Posts posted by webaff

  1. Thank you @joshua for this great module!

    Everything works perfectly. Only I can't get IE11 support to work.
    I'm on ProcessWire 3.0.165 with PrivacyWire 1.0.4.
    JS console says:

    Quote

    Object doesn't support property or method 'from'
    PrivacyWire_legacy.js (1,10449)

    Yes I know I should drop IE11 support... but this is more a legal issue than a functional or cosmetic one.

  2. Hi bernhard,

    geat idea! I can see how that would work in your setup.

    Unfortunately I can not apply this to my situation. I have 4 file fields for the 4 different languages, according to the concept of language-alternate fields. There is always a file for the default language (mandatory user input). But uploading files for those other 3 languages is optional. Now I want to sort by file.modified depending on the user's language. (If there is a file for the user's language, take its modified date for sorting. If not, take the default file's modified date.)

  3. Hi @bernhard,

    A while ago, but have you ever found a solution to sort the way you posted above? (OR-groups are no solution here, I guess.)

    I want to sort after fileField.modified in an language-alternate fields setup:

     

    Seems like language-alternate fields inside selectors do not work. The sort is always by default language.

    Sorting the way you are asking in this thread could solve this problem. I could sort by both, fileField.modified OR (if not empty) by fileField_altLang.modified...

    I would appreciate your reply, thx.

    • Like 1
  4. @Zeka, thanks for your reply. I did try that already with no success.

    I will give some more insight into my setup:
    It's a multilingual site with the concept of _init.php/_func.php/template/_main.php

    Inside my template, I get my PageArray together...

    $matches = $pages->find("template=file");
    $matches = $matches->sort("-fileField.modified");
    $output = renderFileList($matches);

    and pass it on to _func.php, where the output ist generated and returned:

    function renderFileList(PageArray $items) {
      out = '';
      foreach($items as $item) {
        $out .= $item->fileField->modified;
      }
      return $out;
    }

    This returns the timestamp of the language specific file. If user language is not default, this magically gets fileField_altlang, as expected from the concept of language-alternate fields.

    BUT: the results are not sorted by the timestamp of the fileField_altlang but are sorted by the timestamp of the default fileField, no matter what the current user language is. It seems to me, that the concept of language-alternate fields does not work inside Selectors.

    I hope that someone can follow, reproduce or disprove my findings. Thx.

  5. Hi, 

    I want to use language-alternate fields inside selectors for manipulating PageArrays, i.e. find(), sort() or filter().

    I have set up a multi-lingual file upload with the file field "fileField" and its language alternate fields "fileField_lang1", "fileField_lang2", ...

    This works as expected:

    $matches->sort("-fileField.modified");

    While this:

    $matches->sort("-fileFile_lang1.modified");

    ...throws an error: "Recoverable Fatal Error: Argument 1 passed to ProcessWire\PageArray::getItemPropertyValue() must be an instance of ProcessWire\Wire, boolean given, called in ..."

    Maybe I have to turn off outputFormatting? But how would I do that in this context?

    Any help is well appreciated, thx.

  6. Thanks, @Zeka, for pointing out the matching modules.

    In my scenario I have up to 5 user groups (roles) and pages can be accessible for any combination of groups (for all groups or just some of them).
    What's the recommended way to achieve access control on page level?

    A custom solution based on concepts like here: https://processwire.com/talk/topic/3254-restricting-permissions-on-a-specific-page/ ?

    Or one of the following modules?

    Thanks for further help.

  7. Dear community,

    I have a solid workflow for building usual corporate websites with ProcessWire.
    Now I want to use PW for a kind of extranet, a webbased tool for distributing files.

    Specs:

    • multilingual
    • about 400 files at launch, scalable up to 10000 files
    • files are typically PDF but can be of other files types
    • front end user login with forgot password function
    • nice to have: front end user registration
    • 3-5 user roles for access control on page level (each file can be accessible for users of all roles or just for users of certain roles)
    • login history
    • files must not be accessible by direct link, of course. Would be nice to store them outside the http-root.

    I already did some research and one thing seams to be clear: one Page for each file is the PW-way of doing this (https://processwire.com/talk/topic/4602-flexible-downloads-using-pages/). But I'm not able to determine the right concept and modules. Out of the modules over at http://modules.processwire.com/categories/users-access/ at least 7 are promising (though overlap in features, of course). 

    I would really appreciate any advice about modules or concepts.

    Thank you

  8. Hi,

    My page template contains fields of type pagefield (among other fields).
    When adding or updating pages, I use blank values for these page fields.
    The CSV looks something like this:

    title,contentTextarea,filterA,filterB
    First page title,"<p>Text</p>",,
    Second page title,"<p>Text</p>",,

    Now BCE/PW generates a new page as a child of the page that is defined as the parent of the pages that are selectable through the page field. Or simpler: adding/updating results in one new filter inside of both filter groups. The new pages have an empty title field.

    What value do I have to enter for the page fields in the csv to not select a page (filter) and to not generate new pages (filters)?

    • Like 1
  9. Take a look at ProcessRedirects. This module offers an easy way to redirect old urls to current pages. No point losing link equity if you can redirect meaningfully. (This would be my preferred option.)

    Hi DaveP, thanks for your welcome and your help.

    The ProcessRedirects module says:

    Please note that redirects are active only when there is no page at the same url (so that without redirect it would give 404-error).

    But http://domain.tld/index.php/foo shows the homepage and returns 200 OK instead of throwing a 404.

    So the module can not solve the problem, right?

  10. Hi

    As expected http://domain.tld/foo returns 404 Page Not Found.

    But http://domain.tld/index.php/foo shows the homepage and returns 200 OK.

    Can someone please confirm that this is the wanted behavior?

    Background: After redesigning a website Google has a lot of obsolete urls in their index. Some of them look like http://domain.tld/index.php/foo and get redirected to the homepage instead of throwing a 404. These urls are shown as Soft 404 in the Webmaster Tools.

    Thx

    • Like 1
×
×
  • Create New...