Jump to content

Search the Community

Showing results for tags 'solved'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to ProcessWire
    • News & Announcements
    • Showcase
    • Wishlist & Roadmap
  • Community Support
    • Getting Started
    • Tutorials
    • FAQs
    • General Support
    • API & Templates
    • Modules/Plugins
    • Themes and Profiles
    • Multi-Language Support
    • Security
    • Jobs
  • Off Topic
    • Pub
    • Dev Talk

Product Groups

  • Form Builder
  • ProFields
  • ProCache
  • ProMailer
  • Login Register Pro
  • ProDrafts
  • ListerPro
  • ProDevTools
  • Likes
  • Custom Development

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests

  1. Goodmorning everyone, sorry for the inconvenience but I have a problem that I can't find in any other post. Strange things happen on a site: - despite everything being configured correctly (as already done in dozens of other sites) only superusers can create new pages - if I insert in a selector "include = all" the result is always 0 - I should restore a series of pages incorrectly inserted in the trash, but I cannot select them with the selector "status = Trash" Some idea? Thanks so much for your valuable support.
  2. According to this old post, I'm trying to use the PW cache feature: $my_page = $pages->get($pageId); if($my_page->viewable()) { $content = $cache->get("my_page"); if(!$content) { $content = renderCustom($my_page->children); $cache->save('my_page', $content, 3600); } echo $content; } function renderCustom(PageArray $items) { foreach($items as $item) { echo $item->title; // ... heavy content loading } } After loading the page which renders the above code, in the admin I can see something was cached (note: I'm using ClearCacheAdmin) : But when I reload the page the cached value seems do not be used and the page loads slowly. The result of doing var_dump() is the following: var_dump($cache); // return object(ProcessWire\WireCache)#20 (0) { } $content = $cache->get("my_page"); var_dump($content); // return string(0) "" What could be the problem?
  3. Can you confirm that the function renderField for fieldset fields, even having the file /site/templates/fields/fieldName.php or /site/templates/fields/fieldName/$file.php (using $file argument), does not render anything as expected? $page->renderField('fieldsetName') // returns nothing ... or am I wrong on something?
  4. Hi there, I'm working on an email message template and would like to render a custom one to be sent. I tried to use $files->render() this way // rendering file e.g. a template file or a hook statement in ready.php $body = $files->render('emails/myfile', array( 'myVar1' => $var1, 'myVar2' => $var2, ... )); but $vars seems to be not accessible from within the rendered file. That is, $vars seems to be not set: // rendered file emails/myfile.php $myVar1 = $vars['myVar1']; // is not set $myVar2 = $vars['myVar2']; // is not set ... // is not set How can I get the $vars so to properly render the custom message template for sending the email? Notes: By using $files->include() the $vars is accessible but I cannot use this method because I should retrieve the output $body as a return value for sending the email later. So, I'm still looking to render the custom message using $files->render(). This thread is someway related to this one.
  5. I'am working on a migration script from the ImageExtra Module to the new Custom Image Fields feature in ProcessWire. I have some problems while setting a field value to the new custom image field. I have set up the custom field and it works correct in the admin panel but not via the API: $page->images->my_custom_image_field = "test"; $page->save(); Results into: Fatal error: Uncaught ProcessWire\WireException: Item 'my_custom_image_field' set to ProcessWire\Pageimages is not an allowed type in /var/www/html/wire/core/WireArray.php:458
  6. Hello ? I have set up pagination on a mulitlanguage site. I've done this before, but this time I have a problem I can't solve. Pagination is activated on 'parent-template' and 'child-template' just to be sure ? This is my code: $children = $page->children('limit=1'); foreach($children as $child) { $title = $child->title; echo $title; } echo $children->renderPager(); The navigation is output correctly and the link look correct as well 'parent-page/page2/'. But when I click the link, the site seems to redirect back to 'parent-page/ Any help would be greatly appreciated ? - Peter
  7. Hi there, im a bit lost right now. I added an hook after templates::save which should get the affected template and write its template ID into a JSON. The problem is, the event->object gives me an instance of the templates class. How can I narrow this down to the saved Template and get its ID and fieldgroup?
  8. Hey! I've been working on a Processwire installation (3.0.123) for a few days now and I must have made a big mistake this morning because the links in the admin's main menu no longer appear. This is not related to the admin theme, because the bug occurs with all themes (Default, Reno, Uikit). I tried to reinstall with the dev version (3.0.136), but the problem is still there. I also uninstalled all the modules I had added, without success. There is no error in the js console. I still can access/view/edit the pages by going through the admin/page list. Thanks in advance for your help!
  9. Hey all, i do, most probably have a problem with file encoding and / or BOM. My <head> content is getting moved into <body> and i can inspect a couple of &#65279; ( ZERO WIDTH NO-BREAK SPACE) chars with dev tools. I checked all template files with phpstorm, they are all in utf-8 w/o BOM. The current installation is based on a profile i exported from another project where i had not such problems. However, in the new project i did change the default language to german and installed english as the second language. Might there be any conflicts with the language support modules? Hints, tips or solutions are highly appreciated ?
  10. Hi, I try to add page-edit-own and page-delete-own permissions, but it's strange... If a add the custom permissions it looks like both are children of page-edit respectively page-delete. I played with added / revoked permissions, but I can't get it work, that a user of a role just can delete own content. First the user can't delete any content and now the user can delete own and foreign pages ? Is there a tutorial to learn more about the PW permissions? Or do I have to rename the permissions to page-own-edit and page-own-delete to be independent from page-edit and page-delete?
  11. I tried to add a new page with $pages->add() with a custom method inside of a module. It looks like the method is called each page load (as should) and also if the backend page tree is loaded / refreshed (bug??)? public function create($template, $parent, Array $data = array(), $name = false) { $name = wire('sanitizer')->pageName($name ? $name : $data['title']); $obj = wire('pages')->add($template, $parent, $name, $data); return $obj; } called inside of home page ("/"): $api->create('basic-page', '/', array('title' => 'ApiCreatedTest1')); Works fine. Load it twice (create duplicate page) results in an error. But without "/" requested the page gets created if I view the backend?! Checked it by delete the page, check the page tree again and it looks fine. But if I reload the backend page the page appears again. So backend page tree load executes the home page ("/") and create the page? Is it a bug or I'm missing anything...?
  12. Hello everyone, I am starting to creating some hooks, but I am little bit new to this part of Processwire so please help ?. My problem: I have multiple fields in one template - Page Reference - I activated autocomplete and also possibility of creating new pages from the fields. Is it possible to add additional values to newly created page via Page Reference field? For example: I know that the name of Page reference field is called for example car - I am searching with autocomplete for example for Mercedez, it is not created, so I know that newly created page via this field will have value in category field - cars,... I think I should addHookbefore to InputfieldPage::processInputAddPages, am I on the right track? Any assumptions? Thanks for help.
  13. Hello Gentlemen and Ladies. I have not posted for a while but now i need your help figuring out some things. The Documentation has come a long way and i love it. Though on the page: https://processwire.com/api/ref/pageimages/ I am trying to figure out if when i want to add an image to an existing image field with multiple images alldready in it and using the method $page->images->add() <?PHP /* get the images object array for the Page */ $myPageImg = $page->images; /* define the image to add */ $newImg = 'http://www.somesite.com/image.jpg'; /* Thanks Autofahrn, forgot about the output formating */ $page->of(false); /* create a new Pageimage object with the given URL and add to the Pageimages array */ $myPageImg->add($newImg); /* save the page */ $page->save(); ?> I am pretty sure i missed a few steps in the code above? Is that string suppose to be an URL like "http://www.somesite.com/image.jpg" and the method will automaticly download the image and create an Pageimage Object and add it to Pageimages array or does it have to exist on the host first and i supply a file path to that image? I guess im confused about that, hope you guys could clarify that for me. And if it needs to be allready downloaded to my host before adding the image, what would be the best API methods for that task? Just point me in the right direction and i will figure it out. Sorry for the bad explaination but i could not figure out a better way of asking. Thanks in advance. /EyeDentify
  14. Hi to all, i try to save translation on my template from "Find file to translate". Set the string, click save, ProcessWire give me notify "1 translation changed +1" ... but after all field are blank. Processwire v. 3.0.120 Any suggestion? Thanks in advance
  15. Hi all, the site is in non-English language and uses some modules which needs to be translated. Since the content is not multilingual I've installed only the LanguageSupport. I added another language, but can't translate any string since the Admin > Setup > Languages > [en/xx] > Find Files to Translate always returns an error "Object of class DirectoryIterator could not be converted to boolean" and a standard "The process returned no content." text. I've checked the /site/assets/files/[lang id] folder permissions, even chmoded folder and its contents to 777, to no avail. If I manually create the json translation file and then upload it via the admin everything works as expected (I can see the file in the 'Site/Core Translation files' list, I can edit it, and the translation shows up). Can somebody point me in the right direction? Am I missing something? The PW version is 3.0.123. I've setup a few PW multilingual sites with ease, that's why this issue confuses me even more. Thanks, Jan
  16. Anyone have an idea what could be the cause of a Page Reference-Page Auto Complete field to fail with a javascript error JqueryCore.js?v=1550490665:2 Uncaught TypeError: Cannot read property 'length' of undefined at Function.map (JqueryCore.js?v=1550490665:2) at Object.success (InputfieldPageAutocomplete.min.js?v=112-1550487061:1) at l (JqueryCore.js?v=1550490665:2) at Object.fireWith [as resolveWith] (JqueryCore.js?v=1550490665:2) at T (JqueryCore.js?v=1550490665:2) at XMLHttpRequest.r (JqueryCore.js?v=1550490665:2) Even when making a new auto complete field, default settings with a simple template selector, and new page with just that field in it. Running PW 3.0.125 (and 126, same result). Tested it on another 3.0.126, and there everything works fine, so it's probably not related to the core jQuery. Edit, never mind, the admin > pages > search was disabled. Making the autocomplete search, well, not functioning.
  17. I'm doing an artist site and they want to be able to upload a large .tiff to their portfolio. I need to keep to a copy of the original file in the server for the art distributers, and of course serve jpg in the web front end. I had the idea of extending the file or image upload input so that if the image is tiff, keep it, and also convert it to jpg, so I could access through something like $image->originalUrl or $image->size(100, 100)->url I was wondering if you thought this a good idea, or if i'm over-engineering something that could be done simply. Also, I've never extended an input, so any examples are welcome. Thanks!
  18. In the page reference field, one can create new pages if they enable that option. However, the "new" page only gets the title field filled out. Q: Is there a way to expand on this so a user can fill in more fields from the new page? Either in-line or via modal?
  19. I have a page with a good amount of fields on it, I have many other pages in the same template that have no issue, but one particular page just doesn't save changes to any of the fields. I installed the clone page module, cloned the page, and everything cloned fine... but still when i try to make changes to the clone nothing saves either (just like the original page). I expect some kind of notification to show up saying it saved, or not, but i get nothing as if the page reloaded fresh. The failure is silent, and there's nothing in the logs to direct me. This is a real head scratcher and I'm not sure how I should go about troubleshooting it further. Can someone help? Thank you kindly.
  20. I want to show the field "Bilder Französisch" in the admin only if the french title field is filled out. So I entered in the "show this field only if" section on the field title_fr!="" but this doesn't work. How can I achieve this?
  21. Please could someone explain how to mark a topic as solved. This does not appear to be covered by the guidelines.
  22. Hi there! I need to gather a list of all comments, regardless of the parent page of each comment. Is there a global $comments object, which can do this? Something like: foreach($comments->find('sort=-created') as $comment) { // show comment } I did not find anything similar in the forums. Can someone help me?
  23. Just wondering why the custom format is not applied to select options for page reference fields. Is there an easy way to hook and make it possible? Here are the appropriate (offending) template fields:
  24. I want to add a tab to an edit page in the admin via API. I found a code from @kixe here https://processwire.com/talk/topic/15015-tabs-in-module-config-page/?do=findComment&comment=134624 that basically does this, but I can´t get it to work correctly (see screenshot). As you can see the Tab has a weird name and the submit button appears before the fieldset. Also the tab should appear as second, directly after "Inhalt (content)". Maybe I did something wrong when adding the tab to the form? Here is the code that I used: public function ready() { $this->addHookAfter('ProcessPageEdit::buildForm', $this, 'addButtons'); } public function addButtons($event) { $page = $event->object->getPage(); if ($page->template == "bewerbung") { $form = $event->return; $inputfields = new InputfieldWrapper(); $tab = new InputfieldWrapper(); $tab->attr('title', 'Settings'); $tab->attr('class', 'WireTab'); $markup = $this->modules->get('InputfieldMarkup'); $markup->label = 'Settings'; $markup->value = '<p>Just a placeholder for some inputfields.</p>'; $tab->add($markup); $inputfields->add($tab); $form->add($inputfields); } }
  25. HI guys, I am wondering if I am to focused on the problem, so that I don´t see an obvious solution, or that there is no elegant solution... ;-) Ok, here is the usecase: I am building a template with only one image-field that collects all needed images for that page. Also there are several repeater matrix fields: One for each section of the page. In each repeater matrix there is the possibility to choose one of the pages images for displaying it as "fullwidth section image" on frontend. At the moment I am doing this with a textarea, which is prone to errors, due to wrong user input. Is there another possibility to store an image reference as a textarea?
×
×
  • Create New...