Jump to content

Search the Community

Showing results for tags 'bug'.

  • 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. [Posted this in another post, but realized it's doesn't really pertain to it, so I've moved it to this new topic -- again sorry] Hi Ryan (and everyone else!), Just starting using PW and I'm loving it... I've got a site build that requires a bunch of CSV loading and would like some help with API Importing, as I am running into some glitches with page fields. So far I have a bunch of CSVs that work fine with my php code, but I have one that crashes, unless I put in the pageID. I think it may be something larger as I have tried using both BatchChildEditor & ImportPagesCSV modules with a modified CSV, and both get the same error as my code. So, here's my code, it does the following: Reads a page field to get CSV filename Reads 1st row of file to figure out what template and parent to use Reads 2nd row for field titles Processes the remaining rows as data, it also echoes out what it is doing -- not elegant, but it's only for my use // If no filename exit if ($wire->page->getUnformatted('section_slogan') == '') throw new Wire404Exception(); // File Pointer $myfile = "http://" . $config->httpHost . $config->urls->templates . "loaders/" . $wire->page->getUnformatted('csvfilename'); $content = "<p>Using Loader File '{$myfile}'</p><hr/>"; // Read The Data File if (($handle = fopen("$myfile", "r")) !== FALSE) { // Get the Setup Info if (($data = fgetcsv($handle, 0, ",")) !== FALSE) { $myTemplate = $templates->get("$data[0]"); $myParent = $wire->pages->get("path='$data[1]'"); if (($myTemplate->id == 'NullPage') || ($myParent->id == 'NullPage')){ throw new Wire404Exception(); } } else { throw new Wire404Exception(); } // Setup the parent $newItem = new Page(); $newItem->template = $myTemplate; // Tell User what's going on: $content .= "<p>Adding New Pages based on the '{$newItem->template->name}' template to parent '{$myParent->title}' path: '{$myParent->path}'</p><hr/>"; // List out the fields in the template $num = count($newItem->fields); $content .= "<p> $num fields in template</p><ol>"; foreach($newItem->fields as $itemfd) { $content .= "<li>" . $itemfd->name . "</li>"; } $content .= "</ol><hr/>"; // Read header record and match-up fields to template $fieldmatchup = ''; if (($data = fgetcsv($handle, 0, ",")) !== FALSE) { $num = count($data); for ($c=0; $c < $num; $c++) { foreach($newItem->fields as $itemfd) { if($data[$c] == $itemfd->name) { $fieldmatchup[$itemfd->name] = $c; } } } } // Show the File's Field Array $content .= "<p>Display the Field Array</p><ul>"; foreach($fieldmatchup as $item_key => $item_value) { $content .= "<li>['" . $item_key . "'] = '" . $item_value . "'</li>"; } $content .= "</ul><hr/><h4>Reading File</h4><hr/>"; // Now add the data $row = 0; $newItem = ''; while (($data = fgetcsv($handle, 0, ",")) !== FALSE) { $num = count($data)-1; $row++; $mySel = "parent=" . $myParent->id . ", title='" . $data[$fieldmatchup['title']] . "'"; $dupPage = $wire->pages->get($mySel); if($dupPage->id == 'NullPage') { $content .= "<p>newItem (" . $mySel . ")<br/><b>-- Creating from File</b>.</p>\n"; // Setup blank WireArray based on a template $newItem = new Page(); $newItem->template = $myTemplate; $newItem->title = $data[$fieldmatchup['title']]; $newItem->parent = $myParent; $newItem->save(); } else { $content .= "<p>Duplicate Found (" . $mySel . ")<br/><b>-- Updating from File</b>.</p>\n"; $newItem = $dupPage; } $content .= "<p> {$num} fields in record {$row}: <br /></p>\n"; $newItem->of(false); foreach($newItem->fields as $itemfd) { $key = $itemfd->name; if ($key != 'title') { $value = $data[$fieldmatchup[$key]]; $content .= "[{$key}] = [{$value}]<br />\n"; $newItem->set($key, $value); } } $newItem->save(); $content .= "<b>-- Saved: </b> <a target='_blank' href='" . $newItem->editUrl . "'>" . $newItem->title . " [" . $newItem->id . "]</a><hr/>"; } fclose($handle); } $content .= "<b>{$row} records added/updated</b>"; And here's a sample of data that works: (associated_stat & special_category are page fields) skill,"/systems/sol/" title,associated_stat,multiplier,special,special_category,body Alien Archeology,Int,4,,,"Skill description" Alien Tech,Tech,4,,,"Skill description" Alien Weapons,Ref,4,1,Weapons,"Skill description" And the file that's giving me issues:(pc_role_category, associated_book, sa_skill are page fields, career_skills is a multiple page field) cp-role,"/systems/sol/" title,pc_role_category,associated_book,page_no,verified_via,sa_skill,career_skills,body "Merc","Combat Related","Book Name","8","Book Review","Combat Zen","Athletics|Alien Tech|Drive|Shoot","Role Description" It's the associated_book field that's giving me the issue, if I blank it or put in the PageID it works, but with anything else it errors out with this: Fatal Error Call to a member function __unset() on boolean search Source File: ...\core\wire\modules\Fieldtype\FieldtypePage.module:439 431: if($value instanceof Page) { 432: // ok 433: } else if($value instanceof PageArray) { 434: $value = $value->first(); 435: } else if(is_string($value) || is_int($value)) { 436: $value = $this->sanitizeValueString($page, $field, $value); 437: if($value instanceof PageArray) $value = $value->first(); 438: if($value->_FieldtypePage_remove === $value->id) { 439: $value->__unset('_FieldtypePage_remove'); 440: $value = null; // remove item 441: } 442: } So, looking at this field, and the associated page template, everything is setup the same as all the other page fields, except that the page template in question (books) has a field that references a page field (associated_system) that I'm not even referencing, so I'm not sure if that's the culprit or not, but that is the only thing that separated this template from the others is this custom label code and that the pages are outside of the parent: And yes, I've removed the custom label and it still has the same error. With my luck it's something simple, but I can't see it... Any help would be appreciated
  2. I think I've found a bug. Unless I've done this incorrectly. I have a repeater set up that has three fields; a PageField and two Options fields. When you add a new repeater row; you choose your 'page' (PageField) then you choose a 'type' (first Option field) which has four options. I have the second Option field ('width') set up so it only shows if you select the third option from the first Option field. The second Option field has two options (100% and 50% with it being a required field and the default being 100%). If I remove the 'show if' functionality on the second Option field ('width') it shows/works fine but if I add this functionality back in; even though the action of showing/hiding work... when I click 'Save' it doesn't remember the option I choose and it defaults back to 100%. Any thoughts?
  3. Hello, I am using custom styles: CKEDITOR.stylesSet.add('mystyles', [ { name: 'Box', element: 'div', attributes: { 'class': 'box' } }, { name: 'Subheader', element: ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'], attributes: { 'class': 'subheader' } }, { name: 'No margin bottom', element: ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'], attributes: { 'class': 'no-margin-bottom' } }, { name: 'Intro nav', element: ['ul', 'ol'], attributes: { 'class': 'intro-navigation' } }, ]); The thing is: I see my custom styling in the editor (via contents.css) and my styles are selectable and savable. So I style text and save and it works. On reopening the styles won't apply, even if it was successfully saved (right HTML in database), so when I then save, all styles are gone. Am I doing something wrong?
  4. Hello guys, I have a Page field for my own global media gallery. When I select one page, I get following PageArray via the API: object(ProcessWire\PageArray)#287 (7) { ["hooks"]=> array(2) { ["PageArray::render"]=> string(60) "MarkupPageArray->renderPageArray() in MarkupPageArray.module" ["PageArray::renderPager"]=> string(56) "MarkupPageArray->renderPager() in MarkupPageArray.module" } ["count"]=> int(3) ["items"]=> array(3) { [0]=> string(29) "/files/unpublished/" [1]=> string(25) "/files/animals/" [2]=> string(23) "/files/sloth/" } ["total"]=> int(3) ["start"]=> int(0) ["limit"]=> int(0) ["selectors"]=> string(0) "" } So I select 1 Page and get 3 Pages in return? How can this happen? From the interface here, everything looked fine: Here is the stuff that created the field (if needed): $data['getFileField'] = new Field(); $data['getFileField']->type = $this->modules->get('FieldtypePage'); $data['getFileField']->name = 'fooBar'; $data['getFileField']->label = $this->_('File select'); $data['getFileField']->parent_id = $files['page']->id; $data['getFileField']->inputfield = 'InputfieldPageListSelect'; $data['getFileField']->labelFieldName = 'title'; $data['getFileField']->allowUnpub = 1; $data['getFileField']->description = $this->_('Select one file or folder. If folder is selected, the first file inside of it is used.'); $data['getFileField']->icon = 'file-o'; $data['getFileField']->save(); Is this a bug? EDIT: Now I am pretty sure it is a bug in PW (3.0.10): If I select a page via the Page field, the PageArray is only with this page. If I change the page via the Page field (and save), I get the old one plus the new one. So somehow it does not get reseted on new selection.
  5. Hello, I am using a media manager based on pages (1 file = 1 page). I would like to move the dummy file page "Dateityp" to the page folder "Jo!". In PW, I can move this file outside the current folder and into a folder, when there is at least one other file in it. I would like to have the feature of dragging a page onto another page (because my media manager does not really have folders, they are all pages) to be inside this dragged-on page. I think PW does not implement this because of some possible issues if the "Family" for these templates/pages isn't configured right (e.g. does not allow children). A ugly workaround is going to settings of this page and changing the "Parent". This works, but is not nice UX... I hope anyone can help me with that. Is this a bug or a feature?
  6. Hello, thanks for the help the other day. I continued to configure/code my page like I want it. Now i was going to add comments. I installed the Comments Manager Module under "processwire/module/edit?name=ProcessCommentsManager". It got installed and I can see the menuoption under "setup", called: Comments. Problem: It does not matter what link I press. Everyone shows the following error. Even uninstalling shows this error. Page: /processwire/setup/comments/ Error: Fatal error: Class 'Comment' not found in /var/www/testsite/wire/modules/Process/ProcessCommentsManager/ProcessCommentsManager.module on line 80 I am using Processwire 2.7.2. Is anyone here who can help me sorting this problem out? Best regards EDIT: I just realized that this might be the wrong section of the forum. If so, please move this thread. Thanks!
  7. wireRelativeTimeStr($page->published) returns weird results for me, i.e. "8 hours ago" for a page I just published on a site with +9:00 as its timezone (and -5:00 as the server / MySQL timezone, but I'm not sure if that matters.) When I looked into the code, I saw that WireDateTime->relativeTimeStr() uses the numeric timestamp when that's what it's given; $page->published returns a unix timestamp, so that can't be the problem, right? Then I checked the database, and the page table stores published in MySQL's datetime format (which lacks timezone support.) It seems that the application timezone setting was not taken into account somewhere during converting the database datetime field to the internal time representation (integer unix timestamp) in the PHP Page object. "By the way," (and sorry to propose another change; people here will get tired of me so fast) wouldn't it make sense to switch to a simple integer fields, storing the unix timestamp, for the database? No more need to switch back and forth between the internal representation and MySQL's, which is sadly broken whenever timezones matter. And just, less work, right? (well, no more "current_timestamp" default value for modified, but I think there are workarounds for that ) p.s. Why is "published" uses the datetime MySQL type while created and modified use timestamp? Timestamp (which is stored as UTC in the database) would probably make more sense for "published" as well (if only for consistency) -- that is, if we wanna stick to a native time column. As a note to this specific problem, looking up the "modified" field returned damaged results as well. Edit: it's on pw 3
  8. Hello, I'm deployed multiple pw sites already, all with nginx. This time I need to have multiple pw sites for a domain, every one of them under a subdirectory. I've been trying many things, every time I get 404 or 500 errors on /directory/processwire ( the /directory/ works, other pages not ). Did someone already managed to get that working ? PS : Apache is not an option
  9. I recently updated to latest PW and it seems to have introduced one bug: when drag 'n dropping files it doubles the file and starts immediately two upload bars. I tried to figure out which is causing this behavior, but couldn't figure out.
  10. Hi folks, I have just pushed up a site from local to live. I have had a dev server for client testing and all was working fine. However, upon upload, on all the pages, fields are missing (even though the content is coming through on the site) and there's weird formatting issues. Please see the screenshot below. There doesn't seem to be any issues in the console or I have tried reuploading all the files but doesn't seem to change a thing. Any thoughts? Thanks, R
  11. Hello there. Since this is my first post in these forums: Thank you Ryan for ProcessWire and thanks to everyone that is supporting him or other users. I'm having a strange problem using $image->description. When I'm logged in as the default user I registered during install everything's working as expected. $image->description returns the string provided in the backend. Anyways if not logged in, an empty string will be returned resulting in <img src="url-is-still-working" alt="">. I don't really know whats going on. Might be a bug? Here's some code: $slides = ''; foreach ( $page->slideshow_images as $image ) { $slides .= '<li><img src="' . $image->url . '" alt="' . $image->description . '"></li>'; } I'm running ProcessWire 2.5.3.
  12. I find that if I have 'How should this field be displayed in the editor?' selected as 'Always collapsed, requiring a click to open' for a repeater field, and the repeater contains a text area (specifically ckeditor) then more often than not the text area is blank/hidden (if I view source the text is there). Any thoughts?
  13. Recoverable Fatal Error: Argument 1 passed to ProcessPageEditImageSelect::getImages() must be an instance of Page, null given, called in /home/newma121/public_html/wire/modules/Process/ProcessPageEditImageSelect/ProcessPageEditImageSelect.module on line 179 and defined (line 129 of /home/newma121/public_html/wire/modules/Process/ProcessPageEditImageSelect/ProcessPageEditImageSelect.module) This error message was shown because you are logged in as a Superuser. Error has been logged. Administrator has been notified.
  14. For some reason Admin Data Table breaks when you insert a row which starts with number. See attached screenshot -- link doesn't show up and instead it's URL is printed out as plain text. Screenshot is from (unmodified) admin/users, but I'm seeing same strange behavior when adding rows to custom made Admin Data Table too. So far I've tested this with 2.1 and 2.2 and I'm seeing same bug in both. Can anyone else produce this or is there something wrong with my PW installation(s)?
  15. Hi folks, Not sure if there is a 'bug reports' list, but I was giving a tutorial/guide on the CMS for a client today and I came across two issues... 1. When inserting an image or link into a ckeditor field, I received some issues with it displaying any content. At the time I couldn't debug it to check if it was loading in the content via the Network tab in Chrome DevTools, but checking now it seems to be working okay. Different network now. Wasn't sure if it was worth bringing up? I tend to get a few buggy issues with this modal. 2. Also the modal has some slight CSS issues (see attached) with the vertical line. I managed to get rid of it by turning off the position: relative on .ui-dialog .ui-dialog-content and the height:auto on html.modal, body.modal but that seems weird so I wouldn't look too much into it... just a shout out. I am using PW 2.5.3 and Chrome 39.0.2171.95 – I am also on a retina MBP. Thanks and apologies if this is a bit tedious! R
  16. Hello, I have an problem that when uploading a new image, the uploaded stays at 100% but no image was uploaded. I tried chaning memory_limit and co. to 256M or so but nothing worked either. In the error log, there was an out of error warning, caused by core/ImageSizer.php. So: I used "Max Image Dimensions" for resizing every image above 1500px to 1500px. Here is the thing: After disabling this feature, so I don't use max image dimensions feature, everything works. How can I enable this feature without breaking everything? It seems that it's a bug in ImageSizer.php that can't handle with large files on some server systems? I hope for your answers!
  17. Hey, Brand new install running dev 2.3.7. No code modifications. I've setup a simple download system like this: Template: company Fields: title and company Field label: company Field type: Page Dereference in API as Multiple pages Custom selector to find selectable pages: template=user, roles=company, sort=name I add a few users with the guest and company roles. When viewing the company page in the admin the companies show up. But when saving there is an error: Page 1015 is not valid for company. It doesn't matter if there is one or more options selected. I also tried all the "Input field types". I've read PageListSelect input field types are currently not compatible. When I change the custom selector to empty and use the "Parent of selectable page(s)" or "Template of selectable page(s)" the saving is fine. Am I overlooking something?
  18. Noticed a potential bug on 2.5.2 if saving a page field reference to the page you're currently on (no idea why one would want to ) Seems to reload a blank page.
  19. Hello, I think I find a bug. The Situation: I have a news page with pagination. All news_items are children of the news page. when a user give an news_item the name page2 or page3, this page can not be reached, because of the paginationg. The URL is "/news/page2" or /news/page3" and then the pagination run, but not the page.
  20. I think there is a bug in ProcessPageAdd Module. PW 2.4.0 If I try to add an Page by selecting a template with the big button on the right side in Admin 'Add New' and no parent site is given as GET Parameter like: http://example.org/admin/page/add/?template_id=37 the form will appear not complete and without submit button. EDIT: 10 min later .... Ah, its not the module its the Javascript ProcessPageAdd.js. If there is only one page in the list to select, the selection cannot be changed, and the submit button doesn't appear.
  21. output page filter by roles, output in admin and other areas, all good! on Change select page "Page 1022 is not valid for manager" Custom selector to find selectable pages > roles=manager
  22. level1=1 print_r($input->post->level1) return [level1] = 1 level1[level2] = 1 print_r($input->post->level1) return [level1][level2] =1 level1[level2][level3] = 1 print_r($input->post->level1) return null how to fix it!? processWire 2.4
  23. Dear Ryan, please correct the transliteration in the page name on the side of back-end. Error that large letters (non-Latin) are simply removed. //Раз Два Три One Two Tri - az-va-ri-one-two-tri Error can be corrected in Sanitizer.php 129 line public function pageName ($ value, $ beautify = false) { if initially lead all to lowercase using the mb_strtolower $ value = mb_strtolower ($ value); //Раз Два Три One Two Tri - raz-dva-tri-one-two-tri and InputfieldPageName.module 'ю' => 'iu', 'я' => 'ia', in countries where the use of the Cyrillic alphabet. by using the Latin alphabet transliteration written through Y 'ю' => 'yu', 'я' => 'ya', And so, very often Ю, written as Y
  24. It's possible that I'm missing something, but I think I have found an small bug. I am doing a simple page list template (/photos) that is paginated and has url segments on, to allow for filtering through tags. As there are multiple different lists, and they all share the same tags, I need to list the tags that are relevant to this particular list (i.e. the tags that are in any of the list's pages). I attempted: foreach ($pages->get("/tags")->children() as $key => $tag) { if($pages->count("parent=$page, tags=$tag") > 0){ echo "<li><a href='$page->url$tag->name' $active>$tag->title</a></li>"; } } And it seemed to work... BUT it broke on my final page (on page 3 of a 3 page pagination). After doing some testing, I found that this selector, when using pagination, correctly counts all the pages that have the given tag, only if there is at least one in the current page. So: If tag A is in 10 pages, and in the current pagination segment there are any of them, the selector returns 10, as expected If tag B is in another 10 pages, but none of them are in the current pagination segment, the selector returns 0. If I change the selector to address all pages, removing the parent selector, the problem goes away but:Any parent selector pointing to the current parent (being paginated) break this, be it $page, $page->id, or the url or id entered manually The problem occurs without any url segments actually being used. Haven't tested thoroughly enough to be able to tell if it has the same behaviour with url Segments set (i.e. on a tag-filtered subselection of the pages) This was using a page field with multiple pages (as it was for tags) I solved the problem using: foreach ($pages->get("/tags")->children() as $key => $tag) { if($pages->find("parent=$page, tags=$tag")->count() > 0){ echo "<li><a href='$page->url$tag->name' $active>$tag->title</a></li>"; } } Which works well. I can only think of this as a bug, but I may be missing something.
  25. Hi there! I try to add a permission to a certain group so each user will be able to edit his OWN page(wich will be created programmatically). And they must not move the page, even within the same parent. First, the group have only view-page and edit-page permission. And I created a module with this code: public function init() { $this->addHookAfter('Page::editable', $this, 'editable'); } public function editable($event){ $page = $event->object; if($event->return) return; // if it's the role I want to edit permission if($this->user->hasRole("commercant")) { // if it's his page if ($page->created_users_id == $this->user->id) { $event->return = true; } } } I found this strange that there's a button for moving the page (on the page listing).. So I tried it and it doesn't worked, even within the same parent. Not so bad, but I would hope to find a solution to remove the "Move" button. After, I tried to change the parent when editing the page(under settings tab) and it did it with success . So I wonder, is my code have done anything wrong? Quite strange! I use the last dev version. Thank's for your time!
×
×
  • Create New...