Jump to content

webaff

Members
  • Posts

    21
  • Joined

  • Last visited

Everything posted by webaff

  1. Thank you @Macrura for your pointing me to the PHP sample.
  2. Hi, can we use field sets to structure our settings gui? What would the JSON syntax for InputfieldFieldset look like? Thanks
  3. 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: Yes I know I should drop IE11 support... but this is more a legal issue than a functional or cosmetic one.
  4. Maybe a bit late, but this works for me: $wire->addHookAfter('InputfieldPage::getSelectablePages', function($event) { if($event->object->hasField == 'childLinks') { $currentPage = $event->arguments('page'); $parent = "parent=" . $currentPage->id; $event->return = $event->pages->find($parent); } });
  5. @Robin S, I filed this request at GitHub. Maybe you want to comment there to make things more clear. Thanks again for your support.
  6. This issue was solved by two great community members in this thread:
  7. @bernhard and @Robin S, it's all working. Thank you so much! Robin S, further up berhard proposes to file an issue at github. Do you agree?
  8. @bernhard, I'm not sure if I explained my setup clearly. I would be glad if you could jump over to this thread where I explained it in more detail: Thank you.
  9. 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.)
  10. 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.
  11. @LostKobrakai, thats how I had it first, didn't work neither. Thank you for pointing out issues with pagination.
  12. @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.
  13. 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.
  14. Just came across this issue in 3.0.62 and glad to find @Soma's workaround. Not sure if it's caused by the clone function as the pages are created by a client, but highly possible. Hope @ryan can fix this soon, maybe with @LostKobrakai's fixer module. Thx.
  15. 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? https://modules.processwire.com/modules/custom-page-roles/ http://modules.processwire.com/modules/page-protector/ Thanks for further help.
  16. 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
  17. Hi, I have an image field inside a repeater. The GUI of the upload widget gets rendered bad: When adding an image field outside of the repeater, the GUI of the Image Field inside the repeater gets displayed correctly: Is this a bug? Or bad config on my side? Can someone reproduce this behaviour? Thx
  18. 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)?
  19. Thank you, Jan Romero. Installing ProcessJumplinks solves the problem. No further setup required.
  20. Hi DaveP, thanks for your welcome and your help. The ProcessRedirects module says: 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?
  21. 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
×
×
  • Create New...