Jump to content


  • Posts

  • Joined

  • Last visited

Contact Methods

  • Website URL

Profile Information

  • Gender
    Not Telling

Recent Profile Visitors

2,628 profile views

ngrmm's Achievements

Sr. Member

Sr. Member (5/6)




Community Answers

  1. Did you check your Browser-Settings? DNT-Mode? Ad-Blocker?
  2. I use the explode function to generate a json-feed like this $list = $pages->get(1234)->children; $toJSON = $list->explode(function ($item) { return [ 'title' => $item->title, 'id' => $item->id, 'start' => $item->summary, ] } But i would like to use the sanitizer on the summary field. Like this: Obviously this can not work. But how can sanitize the summary before the output? $list = $pages->get(1234)->children; $toJSON = $list->explode(function ($item) { // $itemSummary = $sanitizer->truncate($item->summary, [ // 'type' => 'punctuation', // 'maxLength' => 155, // 'visible' => true, // 'more' => '…' // ]); return [ 'title' => $item->title, 'id' => $item->id, 'start' => $itemSummary, ] }
  3. Looks like it's not possible. It says: • settingsField: Specify a PW field that uses CKEditor to use for the settings of this column. Note that inline mode is always used, regardless of field settings. • …
  4. @FireWire thanks for the module! Is there a way to force regular mode for CKEditorfields inside tables and use fluency? Or are they always in inline-mode, no matter what setting are set?
  5. it's solved. There was an issue with https://www.domain.com and https://domain.com. $config->httpHosts = array('domain.com', 'www.domain.com'); was missing and I activated redirects from https://domian.com to https://www.domain.com
  6. On one of my PW-installations I'm not able to view unpublished pages as superuser. Getting redirected to the 404-page running ProcessWire 3.0.184 and no errors showing up.
  7. Actually this is perfect, as I don't need all the page data. But unfortunately it outputs the page ID as key, what don't want to have. Maybe there will be some options in the future to change this default behaviour. Thanks @Zeka anyway, the other solution works perfectly!
  8. wow much easier than i thought. And what is the correct syntax to go more levels deeper? Let's say one my tags has also page-reference-field itself.
  9. thx @Zeka I got it working with a temporary loop inside my foreach-loop (see update on my post). Actually I needed the tags to be arrays themself. But your method looks better. Is there a way to output the tags as arrays themself with your method?
  10. I know there are some modules (pageQueryBoss, GraphQL, …) this. But non of them outputs exactly how i would like my json to be. So i tried to do it manually: $list = $pages->get(1234)->children; $list_array = array(); foreach($list as $listItem) { $list_array[] = array( 'title' => $listItem->title, 'id' => $listItem->id, 'tags' => array( 'ids' => $listItem->page-reference-field ) ); } $list_json = json_encode($list_array, true); echo $list_json; How do I loop through a page-reference-field inside an array? UPDATE: i think, thats the way to do it $list = $pages->get(1234)->children; $list_array = array(); foreach($list as $listItem) { $listItemTags = array(); foreach($listItem->tags as $tag) { $listItemTags[] = array( 'id' => $tag->id, 'title' => $tag->title, ); } $list_array[] = array( 'title' => $listItem->title, 'id' => $listItem->id, 'tags' => $listItemTags ); } $list_json = json_encode($list_array, true); echo $list_json;
  11. What ever lived before dinosaurs, I'm one of those 🙂 I use Nova as Code Editor which has a FTP-client builtin. Most of the time I'm working on the live-server. ProCache takes care of my scss-files Modules: PrivacyWire, Jumplinks, ProtectedMode, lot of the ProModules, … ProfileSiteExporter for moving Sites I also do not offer hosting Even with a limited setup as mine, there is a lot possible with ProcessWire. What a great CMS and community. btw: Happy new year to you all!
  12. @dadish I tried the above code <?php namespace ProcessWire; echo $_POST['query']; and I'm getting this error in TracyDebugger PHP Notice: Undefined index: query in .../httpdocs/xxxxxxxxxxx/site/templates/graphql.php:3 My graphi template has the forward slash activated. Just to understand this, is it right that I first configure the output with the GraphiQL-tool. And this output is then shown on /graphql/ as json? UPDATE: seems it has something to do with my site-settings I tried it in JS and it works However when I use /graphql/ as URL i see an object in the console. When I use /processwire/setup/graphql/ I see a json in the console $.post( '/graphql/', { query: "{ eventsArticle { list { id } } }" }, function (res) { console.log(res); } );
  13. {"errors":[{"message":"Syntax Error: Unexpected \u003CEOF\u003E","extensions":{"category":"graphql"},"locations":[{"line":1,"column":1}]}]} I'm getting this error for the GraphQl page for domain.com/subfolder/graphql/ GraphiQl (domain.com/subfolder/graphiql/) is working fine. Also domain.com/subfolder/processwire/setup/graphql/ I assume this has something to do with my pw-installation inside a subfolder? I already saw that hint with the slash and also tried this in my graphql-template <?php namespace ProcessWire; header('Content-Type: application/json'); $ProcessGraphQL = $modules->get('ProcessGraphQL'); $ProcessGraphQL->GraphQLServerUrl = '/subfolder/graphql/'; echo json_encode($ProcessGraphQL->executeGraphQL(), true); In my htaccess i have RewriteBase /subfolder/ and in my config file I still have $config->httpHosts = array('domain.com', 'www.domain.com');
  14. I exported a profile and wanted to install it on another webspace. I've done this hundred times and it works always. But this time the install-process fails before the last step. The screen where you can enter admin name and password does not appear. The browser gives me an 200 Error for install.php I can not login into the backend (no user account set yet). At the frontend I get different errors. Looks like any functions linke css() (ProCache) and render() (Formbuilder) causes errors. The server is running php 7.4 and mysql 5.7 PW is the latest masterversion the install.sql in my exported has a 16.4mb filesize the phoinfo() says 120 max time for php executions. Could this be the problem? the first frontend errorlogs after installation fails: 2021-12-14 15:06:19 ? ? You must assign a template to the page before setting custom field values (name1062) [pageClass=ProcessWire\Page, template=] 2021-12-14 15:06:19 guest https://xxxxxxxxxx.com/_new2/ You must assign a template to the page before setting custom field values (name1062) [pageClass=ProcessWire\Page, template=] one after some refreshes in the browser 2021-12-14 15:21:50 guest https://xxxxxxx.com/_new2/ Fatal Error: Uncaught Error: Call to a member function css() on null in /homepages/21/d521107727/htdocs/xxxxxxx/_new2/site/templates/_inc/header.php:50 Stack trace: #0 /homepages/21/d521107727/htdocs/xxxxxxx/_new2/site/assets/cache/FileCompiler/site/templates/home.php(4): include() #1 /homepages/21/d521107727/htdocs/xxxxxxx/_new2/wire/core/TemplateFile.php(327): require('/homepages/21/d...') #2 /homepages/21/d521107727/htdocs/xxxxxxx/_new2/wire/core/Wire.php(414): ProcessWire\TemplateFile->___render() #3 /homepages/21/d521107727/htdocs/xxxxxxx/_new2/wire/core/WireHooks.php(951): ProcessWire\Wire->_callMethod('___render', Array) #4 /homepages/21/d521107727/htdocs/xxxxxxx/_new2/wire/core/Wire.php(485): ProcessWire\WireHooks->runHooks(Object(ProcessWire\TemplateFile), 'render', Array) #5 /homepages/21/d521107727/htdocs/xxxxxxx/_new2/wire/modules/PageRender.module(554): ProcessWire\Wire->__call('render', Array) #6 /homepages/21/d521107727/htdocs/xxxxxxx/_new2/wire/core/Wire.php(417): ProcessWire\PageRender->___renderPage(Object(Proce (line 50 of /homepages/21/d521107727/htdocs/xxxxxxx/_new2/site/templates/_inc/header.php)
  15. maybe because of the 0 values for x and y? btw, do you do that?
  • Create New...