Jump to content


  • Posts

  • Joined

  • Last visited


Recent Profile Visitors

1,062 profile views

VeiJari's Achievements

Full Member

Full Member (4/6)



  1. Hey @michelangelo Our customer wanted a shared webhost. We are not using any kind of module for the API. Because we have Processwire installed in a sub-directory we tried changing our base with .htaccess, which is recommended in the post below, but it didn't work. Is there any idea what should we check next?
  2. Hello forum, we're trying to use Processwire as our REST-API. We are having problems with our API login to Processwire from frontend. It gives us 403 error. We have installed ProcessWire to subdirectory (/api/*) and our frontend is static JS files at root ( / ). Apache access logs gives 404 to our POST-request, but browser devtools shows 403 for our POST /api/login request. Processwire backend panel works. We also have a GET endpoint for the API that returns 200 with correct payload. So we're wondering why does our GET works but POST doesn't? Does this have something to do with Processwire .htaccess, or is this because of our webhost? What should we check first? Any help would be appreciated.
  3. @adrian I changed the names of the field now, but It would be nice to implement an option to import the actual labels of the fields, this way we get more tidy up exports for our customers and end-users.
  4. Hi, I would like to test this option, but I didn't found a way to implement it in the code, could you give me an simple example of this?
  5. Hey how did you get it working exactly? Thanks a bunch for your helpful advices!
  6. @adrian Hey, I see. I'll wait for the next version then. Follow up question: Is there a way to get the labels for the table fields to the exported CSV?
  7. Hey @adrian, I'll start of by saying thanks for this module! I have a slight problem with it though. I'm trying to filter results to the csv export by page references with their ids with the selector option: $modules->get('ProcessTableCsvExport'); // load module $options = array( 'delimiter' => ',', 'enclosure' => '"', 'extension' => 'csv', 'multipleValuesSeparator' => ' | ', 'namesFirstRow' => true, 'columns' => array('sessiontoken', 'logintime', 'pr_ticket.title', 'pr_location.title', 'pr_exhibition.title'), // columns to export can be index starting at 1, or column names //'selector' => 'pr_location=1025|1027', this doesn't find anything 'selector' => 'logintime>= ' . $dateStart . ',loginTime<=' . $dateEnd . ',pr_ticket=' . $selectorTicketIds . ',pr_location=' . $selectorProvidersIds, ); try { $page->exportTableCsv('log_usage_table', $options); } catch (exception $e) { $log->message('Virhe viennissä' . $e); } If I use 'selector' => 'pr_location=1025', it works fine. So I suspect the OR selector doesn't work. Is there way to circumvent this or what should I do? Thanks for the help in advance!
  8. Nvm, I was using some way old version of Profields Table. My bad ?
  9. Hi @adrian I have Profields Table installed and can use the table. But when I try to install this module it says "Module 'TableCsvImportExport' dependency not fulfilled for: FieldtypeTable" Any idea what could cause this?
  10. @kongondo Hey I have a pagereference array added to user template. I'm trying to add multiple pages to it via api. I have all the page ids to add as an array. I can't add multiple pages to the page reference array. I've tried with: $userToCreate->projectReferences->add(wire()->pages->find('id=' . implode ('|', $data->projects), ['findAll' => true])); $userToCreate->projectReferences = wire()->pages->find('id=' . implode ('|', $data->projects), ['findAll' => true])); //however this works $userToCreate->organisationReference = wire()->pages->get('id=' . $data->organisationId, ['findOne' => true]); I'm adding 'findAll' because of my custom authentication for templates. And using wire() because this doesn't happen in a template file How I can add multiple pages to this pagereference array? Thanks for your help!
  11. Thanks Teppo, I do not know why I didn't think of this! Works like a charm!
  12. Hello, I'm trying to create a page via api and populate values to it. I can populate everything except user pages to a page reference array. Code: $dataUsers = $data->project->users; foreach($dataUsers as $dataUser) { $newProject->projectUsers->add(wire()->pages->find('template=user, id=' . $dataUser->id)); } I'm receiving my data via JSON. Is there something I'm missing? Thanks for help
  13. Hey, how about when you already have a empty repeater and you just want to populate fields to it?
  14. I want to achieve that you can give a as many projects you want to a user. But that in $pages->find() the user should see only the pageobjects it has permissions to. I've tried to find how Processwire checks page specific access, but I haven't found it yet. I've tried with $permissions->get() but I only get nullpages, and not the page I've given it access to in the module. I'll keep looking for it in the API-documentation. Thanks for the help anyway, if you know what API-call I should use, It would be nice.
  15. Hi, this is the first we are trying to make a page that has only one type of user that has access to every page. The other users should only have a given access to specific pages, not to the whole template. My structure -Field -Organisation -Project -Report I want that the "measurer" role only has access to "project x" and it's children, but no view access to every project, organisation or field. I've tried to do this with https://modules.processwire.com/modules/page-edit-per-user/ but it still needs a view access to the whole tree to see the "project x" page. Or is there something I haven't figured out? Maybe I have to make it via the API: a select field in the "organisation" template where the admins could add the users and then I use hook to update the privileges? Have you done something like this and how did you accomplish it? Any help would be appreciated.
  • Create New...