Jump to content

Orkun

Members
  • Posts

    295
  • Joined

  • Last visited

Everything posted by Orkun

  1. I get this error when trying to output images on the pdf template: mPDF error: IMAGE Error (URL/TO/IMAGE): Error parsing temporary file image object created with GD library to parse PNG image I am only using your WirePDF Wrapper. Greetings Nukro
  2. Hmm ok. So should I try your mysql script to reorder the descendants of the domain root? When I move the grandchildren out of the child I get this error: What does your script exactly do? Reorder all pages under home? Edit: 36093 is the id of the domain root. Looks like moving childs of domain root returns this error but moving grandchilds returns no error -> This error comes from a different hook of mine, so has nothing to do with the problem itself. PS: I am using 2.7.3 Version
  3. Still the same. But I have found out something. The grandchilds that I am not getting are living under the child "jobs". When I add another grandchild to another child inside the domain_root I get it in the pagefield. Looks like it has something to do with the "jobs" page or so...
  4. Hi Guys I have a pagefield called footer which has this code: return $page->find(''); As for as I know, this should return all descendants of the corresponding page. Now I am using this field on template called domain_root. I have many domain_root pages with some descendants. But one of these domain_roots are just returning the first level of children or. direct childrens. But all the other domain_roots are returning all descendants. I don't know why this is happening. Do you have some ideas what could cause this? All descendants are published, all langstatuses of all descendants are active, access for all descendants are inherited by the domain_root page. All covered up (I think). Greetings Nukro
  5. Hi @adrian False Alarm.. I tested it again and it looks like it's working . Since the template/pages were protected, I had to loggedin in the right "domain root/alias".
  6. Hi @adrian Thanks for this great Module! Is it possible to use your module with somas Multisite module? I tried it with somas latest module version and it didn't worked for me. https://github.com/somatonic/Multisite/tree/dev2 Or should it already work? Have you tested with it? It would be very great! Greetings Nukro
  7. Hi @kongondo For the moment I made some temporary additions to the MediaManagerActions.php file, so that it saves the title in all lang tabs. I added this lines to the code: actionEdit() foreach ($this->languages as $lang) { $p->title->setLanguageValue($lang, $sanitizer->text($media['title'])); //temporary by Nukro } //$p->title = $sanitizer->text($media['title']); actionCreateMedia() foreach ($this->languages as $lang) { $p->title->setLanguageValue($lang, $this->actionRenamer($title, $titleFormat)); //temporary by Nukro } //$p->title = $this->actionRenamer($title, $titleFormat);// @see @todo in actionRenamer() I made this because my customer needs it urgently. Greetings Nukro
  8. Thanks for you answer @tpr I have already installed the plugin. It looks like it only works when you paste in a link and not type it.
  9. Hi Guys When I type www.google.ch inside an ckeditor field it should automatically turn it into: <a href="https://www.google.ch/">www.google.ch</a> And when I type an E-Mail(example@mail.ch) it should turn it into: <a href="mailto:example@mail.ch">example@mail.ch</a> Do I need to install the http://ckeditor.com/addon/autolink Plugin or is this already somehow achievabe inside processwire? Greetings Orkun
  10. Hey @kongondo I think I have encountered an Issue with using the Media Manager with an multi language setup. It looks like the title field is always only filled out in the user language. Let's say I have 2 Languages, english(default) and german. Let's say my user language is german at the moment and I am uploading a new image. Now the default tab of the title of the uploaded image is empty. So when I change the user-language to the default language it won't show any titles in media manager interface since it is empty in the default tab. Would it perhaps possible to fillout the default langauge tab of the title field too even my user language is not the default at the moment? When you are adding tags to the image, all language tabs are also filled out.
  11. Isn't that only available for the 3.x Branch? I am using 2.7.3 dev version. Sorry that I have forgot to say which version of processwire I use.
  12. Has anyone made this module to support multilanguage textareas?
  13. Hey @BitPoet I saw that multilang description of files are somehow ignored. Do you perhaps know why? Greetings Orkun
  14. lol, how I could miss that... haha Thanks, now It's working perfectly (Y)
  15. Thanks for your help @BitPoet I am using your code now and it works still halfaway. Somehow navbar, footer, header and stuff like that are also translated to the new lang inherit even when they have content in the actual active language. They only should take the new language inherit when they have no content in it. Somehow the check inside the loop has no effect I think? Or is it something else?
  16. EDIT: Ok it doesn't matter anymore. I removed the index field from overview-content-page and fetch-content-page template since I realised that they are just overview pages which can be searched through their title and body field. So no need for an index field. I have now another really strange problem. When I try to change the template of a page to a specific template (in this case overview-content-page or fetch-content-page) I end up on a blank page with this url (/processwire/page/edit/saveTemplate) and the template doesn't get changed. It's because of my Hook for updating the index field. But I don't know what is actually causing this. Since I have also other templates with the field index in it and there are no problems.
  17. Ok Guys I could make it to work changing: wire('pages')->setOutputFormatting(true); $content = $page->render($options); wire('pages')->setOutputFormatting(false); like this: $page->setOutputFormatting(true); $content = $page->render($options); $page->setOutputFormatting(false);
  18. Hi Guys I am trying to save Pages with the API from the root Folder in a file named refreshIndex.php. The code looks like this: $root = "/path/to/root"; include($root . "index.php"); //$doctors = wire('pages')->find("template=doctors"); $jobs = wire('pages')->find("template=jobs"); //$news = wire('pages')->find("template=news"); //$specialities = wire('pages')->find("template=specialities-clinics"); //$events = wire('pages')->find("template=signup-form-formbuilder"); //$dbpages = wire('pages')->find("template=doctors|specialities-clinics|news|signup-form-formbuilder|jobs"); //$allpages = wire('pages')->get(27200)->find(""); foreach ($jobs as $stpage) { $stpage->save(); } Now at the moment I am trying to save Job Pages. They are 2 job pages right now. It saves 1 of them and at the 2 one I get an Error like this: Error: Uncaught WirePermissionException: Page '/de/jobs/test-job_ge/' is not currently viewable. in /pathtoroot/wire/modules/PageRender.module:319 They are both using the same template with the same permissions respectively they are visible (guest user is viewable). And also the languages of the page are all active inside page settings. Somehow my Hook is responsible for this. The hook is the reason for my Script above. I am trying to update the index field for my site search. The hooks works fine when I am saving the pages from the backend interface, but I can't save all pages from the backend since they are over 1500 pages I need to save. $this->addHookBefore('Pages::saveReady', $this, 'hookIndexingBefore'); protected function hookIndexingBefore( HookEvent $event ) { $options = array(); $page = $event->arguments("page"); // abort when true if(!$page->template->hasField("index")) return; if($page->isNew() || $page->isTrash()) return; // save user lang $language = $this->wire("user")->language; // clear index field at the begin $page->index = ''; if($page->is("template=specialities-clinics")){ $options['sender'] = $page->choose_sender_2016->id; } $options['pagename'] = $page->name; foreach($this->wire("languages") as $lang) { $this->wire("user")->language = $lang; // change user lang wire('pages')->setOutputFormatting(true); $content = $page->render($options); wire('pages')->setOutputFormatting(false); if($content){ $startStr = "<!--### start-indexing-area ###-->"; $endStr = "<!--### end-indexing-area ###-->"; preg_match_all('/'.$startStr.'(.*)'.$endStr.'/siU', $content, $matches); $newContent = preg_replace("/<div class='breadcrumb.*'>.*<\/div>/siU", '', $matches[1][0]); $newContent = str_replace('<', ' <', $newContent); $newContent = strip_tags($newContent); $newContent = preg_replace("/\s\s+/", " ", $newContent); } $page->index .= $newContent; } $this->wire("user")->language = $language; // restore user language }
  19. Just an addition. You could use the range() function from PHP to create the array. For example like this: range('A', 'Z')
  20. ok i could make it to work when I remove this from the header of my css file: @charset "UTF-8"; /* CSS Document */ And also changed the code to this: $pdf = $modules->get('WirePDF'); $pdf->setTitle($urlpage->title); $stylesheet = file_get_contents($config->paths->templates. "styles/pdf_styles.css"); // external css $pdf->WriteHTML($stylesheet,1); $pdf->WriteHTML($template,2); $pdf->download($urlpage->title.".pdf", "D");
  21. Hi @Wanze I am using the WirePDF module which works great! The only Problem I have is setting the path to a css fille inside the module settings. Somehow the css file didn't get load no matter which path I type in inside the "CSS File" textfield. At the moment my code to generate the pdfs looks like this (working): $pdf = $modules->get('WirePDF'); if($urlpage->template->name == "jobs"){ $template = wireRenderFile("partials/pdf_layouts/pdf_jobs_template.php", array( "urlpage" => $urlpage )); }else{ $template = wireRenderFile("partials/pdf_layouts/pdf_doctors_template.php", array( "urlpage" => $urlpage )); } $pdf->markupMain = $template; $pdf->setTitle($urlpage->title); $pdf->download($urlpage->title.".pdf", "D");
  22. Hi @kongondo I wanted to ask, how it is going with fixed filters inside the media manager? You had said you would look further into it when you have dispensed the version 7. It is a top priority of my customer since it would pretty simplify the workflow of his workers. It's very important, I would be glad when you could say a period (Version 9 ? ) when you would release such a feature. In the end I wanted to thank you for all you efforts you have put in this respectively in your Product, in my eyes it is a masterpiece of work! Greetings Orkun
  23. @Robin S I have now made a file inside the root folder and bootstrapped PW in it. Now I don't get any internal server errors anymore. Some pages get saved now from the api until it stops, when the page is not viewable ( which is right ). But I have looked at this pages and they are visible to the guest user? I get errors like this: page "it/page-name" or "de/page-name" is not viewable etc... So i tought the languages are not activated in the page settings but they are all activated?
  24. Hi Guys I had looked before inside all Apache/PHP/PW log files. There was nothing suspicous. But I have found something else that could be helpful. I logged my hook so that I can watch what is happening. I have found out that my beforeHook on saveReady is called 4-5 times when I am saving from API and when the $content comes from $page->render(). When I save from API and the $content doesn't come from $page->render() it only calls 1 time like it should be. Does page->render calls saveReady function or something similar?
  25. Got it working by creating a template file for the detail pagetemplate with this code inside: $out .= wireRenderFile("partials/jobs-detail.php", array( 'urlsegment' => $options['pagename'], )); Removed this other code from the jobs-detail.php file: if($options['pagename']){ $urlpage = $pages->get("name=".$options['pagename']); } And also changed the hook: if($page->template->name == "jobs"){ $options = array("pagename" => $page->name); }
×
×
  • Create New...