Search the Community
Showing results for tags 'Error'.
-
Hi We need to validate the input fields of the repeater item in Process Wire Admin Page. Currently we can be able to show our custom error messages on page beginning and repeater item field beginning (Please find the attachment). How can we display our custom error messages below the input fields of the repeater item (Similar to Process Wire Error message). Please suggest?
-
- 1
-
- custom error messages
- error
-
(and 3 more)
Tagged with:
-
Hey all. I am trying to create an image-field from API. It is working fine, but opening the page with the new image-field leads to the following error: FieldtypeImage: Field "servicetype_image_1129" is not yet ready to use and needs to be configured. For all other fields I am creating in this module (e.g. checkbox, textarea)...everything is working without errors. This is my code to create the image-field: $f_img = new Field(); $f_img->type = $this->modules->get("FieldtypeImage"); $f_img->name = 'servicetype_image_' . $page->id; $f_img->label = $page->get('title')->getDefaultValue() . ' Service-Type Image'; $f_img->set('tags',$tag); $f_img->set('icon',$icon); $f_img->set('maxFiles', '1'); $f_img->set('noLang', 1); $f_img->set('adminThumbs', 1); $f_img->set("textformatters", array("TextformatterEntities")); $f_img->save(); Anybody an idea what is causing the problem? Thanks a lot in advance!!
-
Hi all, Just a little context, I have need of a select/drop down on a form to update automatically. So I believed I had achieved this, by programmatically updating said field via an webhook, code included below. Which looked like it worked, as all the correct options do now infact show in the drop down on page load.... However, whenever I select one of these newly added options on the drop down and hit submit, it always throws an error as if the field has infact been left blank? Out of curiosity I removed the 'Required' settings from the field, which when I tested does allow me to select a development and then submit without the error, however if you then check the entries tab within Formbuilder that field is just left blank? I also removed the webhook for dynamic population wherein the field on the form started behaving normally again, so presumably something below is causing the problem? Any ideas? $wire->addHookBefore('InputfieldSelect::render', function($event) { $inputfield = $event->object; if($inputfield->name != 'priority_development') return; $options = $inputfield->options; // Get the existing options //GET CURRENT PUBLISHED DEVELOPMENTS $options_new = []; $pages = Processwire\wire('pages')->find('template=development'); foreach($pages as $page){ $region = $page->development_region->title; $options_new[$page->id] = $region.', '.$page->title; } asort($options_new); $inputfield->options = []; // Remove all the existing options // Add the options back with attributes $inc = 0; foreach($options_new as $value => $label) { // Set whatever attributes you want as $key => $value in the last argument of addOption() if($inc == 0) { $inputfield->addOption($value, $label, array('selected' => 'selected')); } else { $inputfield->addOption($value, $label); } $inc++; } $event->return = $inputfield; });
- 1 reply
-
- formbuilder
- api
- (and 4 more)
-
Hi, I have installed 1 year old project backup into the new latest PW version. I used an earlier backup(taken in August 2020) and installed such as : 1. I downloaded the latest (ProcessWire 3.0.185 dev © 2021) then extracted into htdocs 2. copy pasted the site-profile from my backup. (this has the files/folders same as other site profiles, classic, beginner etc) 3. I chose my backup site profile and installed 4. I am able to login the admin panel 5. My fronted home page shows error as below Error: Exception: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'page_path_history.language_id' in 'field list' (in wire/modules/PagePathHistory.module line 752) #0 wire/modules/PagePathHistory.module (752): PDOStatement->execute() #1 wire/core/PagesPathFinder.php (1014): PagePathHistory->getPathInfo('/', Array) #2 wire/core/PagesPathFinder.php (222): PagesPathFinder->getPathHistory('/') #3 wire/core/PagesRequest.php (255): PagesPathFinder->get('/', Array) #4 wire/core/Wire.php (414): PagesRequest->___getPage() #5 wire/core/WireHooks.php (951): Wire->_callMethod('___getPage', Array) #6 wire/core/Wire.php (485): WireHooks->runHooks(Object(PagesRequest), 'getPage', Array) #7 wire/modules/Process/ProcessPageView.module (10 This error message was shown because: you are logged in as a Superuser. Error has been logged. so I removed the line where its selecting language_id from the file wire/modules/PagePathHistory.module line 752 But this is an ugly fix, so is there any other proper fix for this issue ? Does any one experience same issue when trying to install from a backup site profile ? thanks
-
I was hoping to be able to do this entirely in PHP but was having all kind of issues getting it to see my values as numbers instead of strings (got error messages because my PW debugging is currently set to true). I currently have about 10 cards that PW is generating that include thumbnails, descriptions, donation amounts (raised amounts and goal amounts), and donate buttons. What I was trying to do was take the goal amount divide it by the raised amount (using PHP) and simply insert that value into the Progress element's Value attribute. Sounded simple enough but I couldn't get PHP to simply divide those two fields. First I tried dividing the goal value by the raised value and inserting it into the value attribute, like so: <? php $raised = $page->get("raisedAmount$count"); $goal = $page->get("goalAmount$count"); $percent = $goalNum / $raisedNum; ?> <progress value="<?php echo $percent; ?>" max="100"></progress> Which gave me this error message: Uncaught TypeError: Unsupported operand types: string / string Then I tried converting the two strings to integers because apparently PHP couldn't detect they were numbers and do it, like so: <?php $raised = $page->get("raisedAmount$count"); $goal = $page->get("goalAmount$count"); $goalNum = (int) $goal; $raisedNum = (int) $raised; if ($raisedNum != 0) : $percent = $goalNum / $raisedNum; else: $percent = 0; endif; ?> <progress value="<?php echo $percent; ?>" max="100"></progress> but all of the progress bars remain at zero percent (not shown), even when I have values in some of the $raised variables. Please note, if I add this code: <?php echo $percent; ?> below the Progress element, it shows 0 on every single card, so the $percent is never calculated (as per the $percent = $goalNum / $raisedNum;) even though $raisedNum should not equal 0 during that iteration of the loop (the original code includes a loop, which I omitted to keep the code sections above smaller, notice the $count at the end of the $raised and $goal variable declarations). When the loop goes over "raisedAmount1" there is a value in there; however, after typecasting it to an integer ($raisedNum) the value is 0 for someodd reason instead of 40,000, which is what is in the $raisedAmount1 field in Processwire... I'm new to relatively new to PHP and Processwire and could really use some help on this one. Thanks in advance for any helpful replies!
- 13 replies
-
- conditional statement
- typecasting
-
(and 4 more)
Tagged with:
-
I have a nested page structure that fails for users without superuser permissions: Works for superusers / non-superusers: - foo -- bar --- page (status: published) ---- page (status: published) --- page (status: published) Fails for non-superusers (Works for superusers): - foo -- bar --- page (status: published) ---- page (status: published) --- page (status: unpublished <- apparently the template structure fails when there's one unpublished page) Template: <?php foreach ($page->children('include=all') as $p): #Fails for non-superusers ?> <?=$p->render()?> <?php endforeach; ?> a) Works for non-superusers when I grant Page Edit permissions (on the template) to their assigned role/s. b) When I remove 'include=all' or 'include=unpublished' then it also works for non-superusers: <?php foreach ($page->children() as $p): #Works for non-superusers ?> <?=$p->render()?> <?php endforeach; ?> Error message (non-superusers) Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Error has been logged. /www/site/assets/logs/errors.txt /foo/bar/baz/ Error: Exception: Page '/foo/bar/baz/quz/' is not currently viewable. /www/site/assets/logs/exceptions.txt /foo/bar/baz/ Page '/foo/bar/baz/quz/' is not currently viewable. (in /wire/modules/PageRender.module line 410) Debug (non-superusers) Error: Exception: Page '/foo/bar/baz/quz/' is not currently viewable. (in wire/modules/PageRender.module line 410) #0 wire/core/Wire.php (397): PageRender->___renderPage(Object(HookEvent)) #1 wire/core/WireHooks.php (823): Wire->_callMethod('___renderPage', Array) #2 wire/core/Wire.php (465): WireHooks->runHooks(Object(PageRender), 'renderPage', Array) #3 wire/core/WireHooks.php (924): Wire->__call('renderPage', Array) #4 wire/core/Wire.php (465): WireHooks->runHooks(Object(Page), 'render', Array) #5 site/templates/template.php (191): Wire->__call('render', Array)
-
Hey all. I'm having an issue with the new custom page classes feature which is a fantastic tool. I am running into a recursion issue when attempting to call a custom page class. I have a class called BlogPostPage.php (for blog-post.php) which contains a method called getSummary(). That method gets a summary field or truncates the body in it's absence. I've attached photos of the template code, custom page class code (which I've simplified for testing), and the PW output error. There is no recursion in the getSummary() method. This error occurs whether I output multiple blog posts in a loop or if I output one blog post with no looping in my template code. In use: ProcessWire 3.0.164 dev PHP 7.3.13 I am also using the Template Engine Twig module which has not caused any errors or issues thus far. Many thanks!
-
-
- user
- create user
-
(and 1 more)
Tagged with:
-
Fieldtype Integer, dont save option max, min with value 0 (zero). Positive values (> 0) and negative (<0), perfectly preserved. Without 0, built-in filter is not working properly.
-
Hi all, after moving a new 2.5 install to a different server, I always get this error message in the backend: Unrecognized HTTP host: 'subdomain.mydomain.tld' - Please update your $config->httpHosts setting in /site/config.php The entry in config.php contained the new domain when I installed. Then I set the entry to an empty array. $config->httpHosts = array(''); But the error still displays in the backend. How can I get rid of it?
- 13 replies
-
- 1
-
- Unrecognized HTTP host:
- error
-
(and 1 more)
Tagged with:
-
Hello Dear PW Gurus. Hope you fair well in these Corona Crisis times. Anyhow, i have a problem with a Cryptic error message that shows up when i am trying to Delete images out of a Images field. The Error message does say a little but it does not make sense to me why i can´t delete the images because of it. Is it some permission issue perhaps? I will attach screenshots of it and what i did prior to it. I am from sweden so ignore the funny words here and there. Hope you all can send me on the right track. i am running PW 3.0.139 on this install. Step1: Step 2: Select the images with the trashcan symbol Step 3: Cryptic Error message I am scratching my head on this one, have not seen this before. Thankfull for all help. /EyeDentify
-
Hello forum. I'm trying to figure out how to detect if current form has errors after saving it in pw admin page. This is so that our event location isn't added in database if we detect errors. But I can't seem to find a correct way to detect errors? I only found the wire()->errors() and it always triggers even if I don't have any errors. How can I detect errors in a form? By error I mean $page->error('this is the red error');
-
Hello, I'm getting a JS error in the admin backend when editing pages with template basic-page as non superuser: TypeError: a.ProcessPageList is not a function in InputfieldPageListSelect.min.js Investigating the JS, I found that the ProcessPageList function is not available on the page when I am logged in as a non superuser. The function is defined in /wire/modules/Process/ProcessPageList/ProcessPageList.min.js which is not loaded when logged in as non superuser. When logged in as a superuser, the file gets loaded. I have no fancy permission settings for that template for the role admin that the non superuser belongs to: This started happening on a site that is in development but online for some time now. I can't say which actions might have caused this. But it is a consistent error only for this one template. The site is running on 3.0.42 EDIT: The inputfield triggering the error is an image field (in fact there are 2 of them in that template) Any pointers to potential causes for this problem would be much appreciated. EDIT: The problem is not related to any file changes. When I run the same install with a DB backup, the error disappears. So it must be something that has changed in the DB. Trying to diff the DB dumps and see if I can find anything suspicious
-
Hi, I'm trying to install ProcessWire on XAMPP localhost. I extracted the zip and put the files from master folder to website directory folder and when I go there with Firefox it says 404 page not found (no site configuration or install.php available). At least install.php surely is there. I'm doing WordPress installations on localhost almost every day and no problems. Does anyone here know what is cause for this error?
-
Hi, So I'm working on my site, getting round to completing it. I remember that I haven't checked at all what it will be like on other devices, so that's my next task. I went to the index page and I get hit with this error: Fatal error: Exception: SQLSTATE[HY000] [2002] Connection refused (in /var/sites/b/mysite.org/public_html/wire/core/ProcessWire.php line 377) #0 /var/sites/b/mysite.org/public_html/wire/core/ProcessWire.php(209): ProcessWire\ProcessWire->load(Object(ProcessWire\Config)) #1 /var/sites/b/mysite.org/public_html/index.php(52): ProcessWire\ProcessWire->__construct(Object(ProcessWire\Config)) #2 {main} in /var/sites/b/mysite.org/public_html/index.phpon line 64 All I have done from the last code update was change a links target to blank, pushed the update and tested it. Now my site is broken? Went back and changed to the original file and I'm still getting the error. I really don't understand what has happened. I am an ok {6 months} web developer with this being my first experience of PW. All help is appreciated ?
-
All of a sudden, with nothing changed on the database or server, a website was getting error when doing a search: Error: Exception: SQLSTATE[HY000]: General error: 23 Out of resources when opening file './your-database-name/pages_parents.MYD' (Errcode: 24 - Too many open files) (in /home/forge/example.com/public/wire/core/PageFinder.php line 413) #0 /home/forge/example.com/public/wire/core/Wire.php(386): ProcessWire\PageFinder->___find(Object(ProcessWire\Selectors), Array) #1 /home/forge/example.com/public/wire/core/WireHooks.php(723): ProcessWire\Wire->_callMethod('___find', Array) #2 /home/forge/example.com/public/wire/core/Wire.php(442): ProcessWire\WireHooks->runHooks(Object(ProcessWire\PageFinder), 'find', Array) #3 /home/forge/example.com/public/wire/core/PagesLoader.php(248): ProcessWire\Wire->__call('find', Array) #4 /home/forge/example.com/public/wire/core/Pages.php(232): ProcessWire\PagesLoader->find('title~=EAP, lim...', Array) #5 /home/forge/example.com/public/wire/core/Wire.php(383): ProcessWire\Pages->___find('title~=EAP, lim...') #6 /home/forge/example.com/public/wire This error message was shown because: you are logged in as a Superuser. Error has been logged. I tried several things, listed in this thread: https://serverfault.com/questions/791729/ubuntu-16-04-server-mysql-open-file-limit-wont-go-higher-than-65536 But for some reason, MySQL was not getting its limit increased, but in the end, the one that did the trick was this: This worked for me on Ubuntu Xenial 16.04: Create the dir /etc/systemd/system/mysql.service.d Put in /etc/systemd/system/mysql.service.d/override.conf: [Service] LimitNOFILE=1024000 Now execute systemctl daemon-reload systemctl restart mysql.service Yes indeed, LimitNOFILE=infinity actually seems to set it to 65536. You can validate the above after starting MySQL by doing: cat /proc/$(pgrep mysql)/limits | grep files
-
[SOLVED] InputfieldInteger not found on Core Update
phillipschmitz posted a topic in General Support
500 Error after the latest Core Update. I have no idea why and what causes the problem, or how to solve it. (Maybe reupload the wire folder?) Any ideas?- 11 replies
-
- internal error
- 500
-
(and 3 more)
Tagged with:
-
I am using new processwire and I am receiving this error in my _func.php Parse Error: syntax error, unexpected 'return' (T_RETURN) Parse Error: syntax error, unexpected '$out' processwire anyone knows anything ??
-
Hi, Whenever I try to create a repeater field on my website, I get following error: General error: 3161 Storage engine MyISAM is disabled (Table creation is disallowed). If I still continue, it creates the field but doesn't allow storing any kind of data. How do I resolve this? Is there any alternative to repeatable content that I can use? Thanks for your time.
-
Hi, guys! I'm quite new to ProcessWire, but already have few sites up and running. Few days ago two of four PW3 websites hosted on the same hosting ground started to throw error 500 stated that Fatal error: Class 'Page' not found in /..path_from_root../wire/modules/Fieldtype/FieldtypeRepeater/RepeaterPage.php on line 14 I've changed nothing in the code/content of those two sites for two weeks, so I think something could change on the hosting ground. Could I get some advice, how to trace the problem and fix it? Any help would be appreciated.
-
Hi all, Is there a way to turn off fatal error notification without nullifying or commenting out: $config->adminEmail Thx Rudy
-
Hi all, Im a bit confused by an issue I have come across today. I have a module which connects to a third party (once an hour using LazyCron), parses a publicly available XML file, turns it into useable information which I then use the API to save as PW Pages. On the whole this has been working great however today I noticed that it kept failing on one of the imports. After doing some investigation I realised its appears to be dying at the save page stage. From the documentation $page-save() should return either True/False, so I thought I would update the code to reflect this while debugging. $this->log(1); $bool = $p->save(); if($bool){ $this->log('Saved successfully'); } else { $this->log('Fail to save'); } $this->log(2); However the script only gets to the save() part and then appears to terminate. Then when checking the error log the latest entry is always just '1' Any ideas as i'm a tad confused why I at least don't get a response of some kind?
-
Hello, after migrating a PW-Site to a new server, a client gets an 500 Internal Server Error. The Debug-Mode tells: Error: Exception: SQLSTATE[42000]: Syntax error or access violation: 1055 'db468587.pages.parent_id' isn't in GROUP BY (in /var/www/vhosts/.../httpdocs/wire/core/Pages.php line 2103) #0 /var/www/vhosts/.../httpdocs/wire/core/Pages.php(2103): PDOStatement->execute() #1 /var/www/vhosts/.../httpdocs/wire/core/Pages.php(546): Pages->executeQuery(Object(PDOStatement)) #2 /var/www/vhosts/.../httpdocs/wire/core/Pages.php(130): Pages->getById(Array) #3 /var/www/vhosts/.../httpdocs/wire/core/ProcessWire.php(300): Pages->init() #4 /var/www/vhosts/.../httpdocs/wire/core/ProcessWire.php(259): ProcessWire->initVar('pages', Object(Pages)) #5 /var/www/vhosts/.../httpdocs/wire/core/ProcessWire.php(94): ProcessWire->load(Object(Config)) #6 /var/www/vhosts/.../httpdocs/index.php(232): ProcessWire->__construct(Object(Config)) #7 {main} Any Idea or Help appreciated!