Jump to content

Search the Community

Showing results for tags 'solved'.



More search options

  • 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
  • ProDrafts
  • ListerPro
  • ProDevTools
  • Likes
  • Custom Development

Categories

There are no results to display.


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

Found 81 results

  1. 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?
  2. 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...?
  3. 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.
  4. 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
  5. 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
  6. 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
  7. 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.
  8. Hi all, Hope that there is a quick tip that someone already know... Is it possible to search in multilanguage fields only in the current language values without to search in the default language as fallback? See the quote below. In other words.. I would like to search only in the current language (Dutch), no matter if some of the Dutch language values are empty. Is it possible? Thanks
  9. 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!
  10. 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?
  11. 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.
  12. 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?
  13. Please could someone explain how to mark a topic as solved. This does not appear to be covered by the guidelines.
  14. 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?
  15. 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:
  16. 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); } }
  17. 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?
  18. If I try to upload the same file (an image) to the "files" field AND to the "image" field (for thumbnail generation) on a page. But if I do that I get an error which says: How can I tackle this problem? Is it somehow possible? Because I need the image for a thumbnail and the file from the files field can be downloaded.
  19. Hello! I was working on my website on Friday with what appears everything to be fine, and I come back today and now I can't access any page, I just get a white page with no information and no logs are logging what the issue is and I'm quite stumped frankly as to the cause. Going to http://138.197.146.76/ just brings up a blank page and no error logs and it's driving me crazy trying to troubleshoot. If you go to any other non-processwire page it works fine, like the php info page: http://138.197.146.76/info.php At first I thought it was an .htaccess issue (UTF-8 BOM info being parsed by Apache2 a the head of the file) but in re-uploading it that didn't solve it. Then I thought it was a php error from the index page being loaded but no PHP errors appear anywhere that I can see with a timestamp near to today, nor does the Processwire log update. It hasn't updated since the 10th and I'm not sure why. After 10 years of WordPress development, I'm pretty decent at troubleshooting server issues but this just has me for a loop, I'm not sure what's going on here so if anyone has any insight or wouldn't mind taking a look to troubleshoot I can provide you with root access to the server (it's a Ubuntu 16 LTS droplet on Digital Ocean). I've included dumps of my most recent logs, maybe I'm missing a detail? Any insight would be appreciated! Regards, Virtually(Creative) errors.txt access.log error.log
  20. hi I have observed that processwire always cache my page even if i have disable cache from template, my problem is that trying to style the page and to be able to see my changes i have to clear the cache either by save the page again or delete the assets/cache/* or inside module page render . i have try processwire v 3.0.39, 3.042, 3.051 thanks
  21. Hi guys I need an estimate for the following task: I developed a job candidate application in ProcessWire and need an extension to a Lister Pro Page. My customer wants to display a summary table of the filtered data like in the attached screenshot. When you filtered the view, that summary should show how many candidates have which status according to the actual filtered view. If you change the filter, the summary table has to be updated also. Who can accomplish this task and what would it cost? I first need an estimate to tell it to my customer. If he says the price is ok I will provide you with FTP Data to a dev server version of that tool. Thank you in advance.
  22. Often, the pages I find myself referencing in a page field (whether through asmSelect or otherwise) are very simple. They might be categories, tags, or something along those lines, but they only contain a single text field. In cases like these, it would be great to be able to add new ones from the page that contains the referencing field. So if, for instance, I were adding a new page to a site, and had a "topics" field that selected pages from /topics/, and I realized that topic didn't exist yet, I could add it from the page without having to go back to the page tree, navigate to /topics/, create a new topics page, publish, then return to my unpublished new content page. I suppose the most straightforward plan of attack would be to create a new inputfield module, but ideally, this could be applied to any of the existing ones, whether checkboxes, asmSelect, or auto complete. Can a module extend other modules in that way?
  23. I'm building a website that creates pages, sets the template and once a payment has been processed the page needs to be set to published. I need to know how to set this in the PHP Page class. Is it just $page = new Page(); $page->published = FALSE;? I couldn't find out how to do this in the docs. Thanks Clint
  24. I am working on a simple photo gallery site where I have level one: Home, Galleries, Statement level two: Set 1, Set 2, Set 3 etc. (under Galleries) level three: a template that cycles through the child photos of Set 1, Set 2 or Set 3 set by using this code: if ($page->prev->id) { echo "<a href='{$page->prev->url}'></a>"; } else { $lastpage = $page->siblings->last(); echo "<a href='$lastpage->url'></a>"; } echo "<a href='{$page->parent->url}'></a>"; if ($page->next->id) { echo "<a href='{$page->next->url}'></a>"; } else { $firstpage = $page->siblings->first(); echo "<a href='$firstpage->url'></a>"; } echo "<img class='centered' src ='{$page->images->first()->url}'"; The level one and two navigation menus show the the active links as "on" and highlighted according to my CSS declarations at level two. For example: Home Galleries Statement [set One] [set Two] [set Three] [Thumbnail 1] [Thumnail 2] [Thumbnail 3] But clicking on the Thumnail 2 and cycling through turns off the Set Two link: Home Galleries Statement [set One] [set Two] [set Three] <prev [image detail] next> What do I need to add or change to make the second level navigation show as being "on"? This is the code I am using in the header included in all templates at level 1, 2, and 3: <div id="primary-menu"> <?php // Create the top navigation list by listing the children of the homepage. // If the section we are in is the current (identified by $page->rootParent) // then note it with <a class='on'> so we can style it differently in our CSS. // In this case we also want the homepage to be part of our top navigation, // so we prepend it to the pages we cycle through: $homepage = $pages->get("/"); $children = $homepage->children; $children->prepend($homepage); foreach($children as $child) { $class = $child === $page->rootParent ? " class='on'" : ''; echo "<a$class href='{$child->url}'>{$child->title}</a>"; echo " "; } ?> </div> <div id="secondary-menu"> <?php echo "<hr>"; // Output subnavigation // // Below we check to see that we're not on the homepage, and that // there are at least one or more pages in this section. // // Note $page->rootParent is always the top level section the page is in, // or to word differently: the first parent page that isn't the homepage. if($page->path != '/' && $page->rootParent->numChildren > 0) { // We have determined that we're not on the homepage // and that this section has child pages, so make navigation: foreach($page->rootParent->children as $child) { $class = $page === $child ? " class='on'" : ''; echo "<a$class href='{$child->url}'>{$child->title}</a>"; echo " "; } echo "<hr>"; } ?>
  25. Hi, Is there a way to specify the default Page which appears upon login, either by role or user? I've made a custom admin Page I'd like to appear instead of Pages. Probably am overlooking something simple... Thanks! -evan
×
×
  • Create New...