Jump to content

Search the Community

Showing results for tags 'errors'.

  • 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

Found 11 results

  1. I'm using since 2017 some self developed non public module to upload and manage images via Adobe Scene7. So we don't save images on the filesystem. Since some weeks I get this error in the admin panel. Can I hide this in some way or with some hook? It affects nothing in my setup.
  2. My hosting company (Dreamhost) upgraded their VPS accounts from Ubuntu 14 (also known as Trusty) to Debian 10 (aka Buster). Since they have done that, I can no longer upload photos through the PW admin. Most of my templates use the Images field and when I go to upload an image - no matter the size, I just see spinning over the image icon. I checked my console and get the following errors: [Error] Failed to load resource: the server responded with a status of 418 () (edit, line 0) [Error] SyntaxError: JSON Parse error: Unrecognized token '<' parse (JqueryCore.js:2:13595) parseJSON (JqueryCore.js:2:13595) (anonymous function) (InputfieldImage.min.js:1:35271) I have multiple sites hosted by Dreamhost and this is now happening on all sites. I am using Processwire 3.0.165. PHP 7.4. I don't know what other info is helpful so please let me know if you have any ideas. I have filed a ticket and suspect this is a result of the upgrade as all these sites worked previously. And the sites still work - just can't upload and save to the images field.
  3. If you want, you can filter them out and focus more on your essentials. But first things first. There is a whole list of different PHP errors, warnings and hints (notices). The one we are interested in is E_DEPRECATED. These messages indicate that a used PHP function somewhere in the code is no longer supported in a future, i.e. higher PHP version, not the actual used one. Example: The days (February 2022) I have changed my developer machine to use the latest PHP version 8.1.2. The last PHP 7.4+ is still supported for 9 months from today on, PHP 8.0 still for 1 year + 9months, PHP 8.1 for 2 years+ 9 months, and all other PHP 8+ versions each plus one more year. So the point is clear now, right? It will be year(s) before PHP 9 is on the schedule. ? Currently in v8.1.2, depending on what code I run, I get notices that certain PHP functions will no longer be available starting with PHP 9. (PHP 9! see above). So currently these functions are safe and supported functions, as in past versions as well as in all further PHP 8+ versions(!). No matter how many additional PHP 8+ versions there will be. ProcessWire by default allows us to suppress ALL output, or show ALL output, by the boolean configuration variable "$config->debug". This is good and right, because on a production site you should always suppress all those outputs. On a developer machine it usually shouldn't bother you if there are also E_DEPRECATED hints included. But if it does, you can filter them out as follows, for example. In your site/config.php you can define a own error handler function and load / bind it on your developer machine only. As a proof of concept or simple example, I added the following function to my site/config.php /** OWN ERROR HANDLER FOR DEPRECATION NOTES **********************************************/ function myLocalDevDeprecationErrorHandler($errno, $errstr, $errfile, $errline) { if(!isset($GLOBALS['DEPRECATION_WARNINGS_BAG'])) { $GLOBALS['DEPRECATION_WARNINGS_BAG'] = []; } if(!is_array($GLOBALS['DEPRECATION_WARNINGS_BAG'])) { $GLOBALS['DEPRECATION_WARNINGS_BAG'] = []; } $GLOBALS['DEPRECATION_WARNINGS_BAG'][] = [$errfile, $errline, $errstr]; return true; // true | false = suppress further processing } /** OWN ERROR HANDLER FOR DEPRECATION NOTES **********************************************/ With the following call, also located in my developer machines site/config.php file, I bind it to all raising E_DEPRECATED warnings ONLY! So we are sure and free from all other types of errors, warnings, hints, etc. // preceed the callback function name with the PW namespace, // and define the error types that should passed to the function set_error_handler('ProcessWire\myLocalDevDeprecationErrorHandler', E_DEPRECATED); (read more on php.net) Now you will not see any of the deprecated notices any more, cluttering your screen. Neither in the front end nor in the backend. But they are all collected in our bag. ? A simple loop in the site/templates/admin.php, before the controller.php is called, can display any of it, maybe to the superusers only, for example: <?php namespace ProcessWire; // IF WE HAVE CACHED PHP DEPRECATION WARNINGS, SHOW THEM IN THE ADMIN, FOR SUPERUSERS ONLY if(isset($GLOBALS['DEPRECATION_WARNINGS_BAG']) && is_array($GLOBALS['DEPRECATION_WARNINGS_BAG']) && 0 < count($GLOBALS['DEPRECATION_WARNINGS_BAG']) && $user->isSuperuser()) { foreach($GLOBALS['DEPRECATION_WARNINGS_BAG'] as $deprecatedMessageItem) { $deprecatedMessageItemMSG = "PHP DEPRECATED (v". PHP_VERSION .") = \n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"; $deprecatedMessageItemMSG .= "{$deprecatedMessageItem[0]} : [{$deprecatedMessageItem[1]}]\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"; $deprecatedMessageItemMSG .= "{$deprecatedMessageItem[2]}"; $this->message($deprecatedMessageItemMSG); } } require($config->paths->adminTemplates . 'controller.php'); If you want to show them on the front end to, it belongs to how you have organized your output strategy. I use a delayed output with _init.php and _main.php, where I have a special function for adding all kind of debug messages, that gets displayed on the end of the site, after the footer. Simply adding the whole collected array is enough for my information: if(isset($GLOBALS['DEPRECATION_WARNINGS_BAG']) && is_array($GLOBALS['DEPRECATION_WARNINGS_BAG']) && 0 < count($GLOBALS['DEPRECATION_WARNINGS_BAG'])) { mvdr(['DEPRECATED ('. PHP_VERSION .')' => $GLOBALS['DEPRECATION_WARNINGS_BAG']]); // add it to the debug output region var } The outputs in admin then may look like this Or the very basic info for me on front end
  4. Hello how are you, I need help on how I can solve this, update a module and now I don't know what to do
  5. Hi Guys, I have been debugging a site for the last 2 hours and cannot solve the issue. I have a site running on 3.0.148. I installed the Kongondo Blog module and was updating the templates to include the website style. Once everything was set and done, I checked the page tree to see an error appear. Template must be assigned a name before 'filename' can be accessed The same error appears in templates. Debugging Steps I checked the templates in the server to ensure I didnt accidentally delete the namespace. Deleted cache in browser and server under assets Still no go. Any help is appreciated. Thanks!
  6. Hello all, I have recently installed ProcessWire as I am learning to develop my own personal website. The installation process was completed, pressed 'Login to Admin' and I am receiving a 404 error. I am using a GoDaddy Shared Hosting Package with Plesk installed. Does anyone have any experience with using ProcessWire on a shared hoasting package? Many Thanks.
  7. Hi, I have a small module I created that copies across field content from one page to multiple other pages. I just added a repeater field and while it copies across to the other pages it has caused timeout/memory issues with PHP. I think this is because of the multiple fields within the repeater (title, text caption, image) each being copied multiple times. I thought one way to help would be to not copy images across as they're not needed in the other pages. However I'm unable to figure out how to copy a repeater field excluding one field within the repeater itself. This is my current code: // Inline gallery 1 if(count($page->article_inline_gallery_1)) { $translation->of(false); $translation->article_inline_gallery_1->removeAll(); $gallery = $page->article_inline_gallery_1; foreach($gallery as $item) { $translation->article_inline_gallery_1->import($item); $translation->save("article_inline_gallery_1"); } } At the point that each repeater imported as a whole ->import($item) could anyone help to exclude one of the fields within the repeater?
  8. I moved a site from my local machine to a staging server over the weekend. The site (front end) displays fine but the backend gives error of I checked the files on the site under /wire/modules/System/SystemNotifications/ and can confirm SystemsNotifications.module exists. Opening this file up and looking at line 346 ... // convert runtime Notices to Notifications and bundle into array if($this->placement == SystemNotificationsConfig::placementCombined) { The SystemNotificationsConfig mentioned above is a PHP file which also exists and has the same permissions as the working version on my test site.
  9. Hey, I started on my tag system with repeaters... It works, but I get a bunch of errors... And I've got no idea what the problem is. These are errors in the session->error and I've put them in a JQuery plugin called toastr. It looks like this: What can I do to change this? Or is this only in debug mode and it doesn't really matter?
  10. Hi all, I've just discovered an error on a LIVE site. I'm uploading images, then adding the already uploaded image to a Page The file gets uploaded first into the root of file, then the user submits a form with the file name in entry_photo $entry->entry_photo = $config->paths->files . '/' . $input->post["entry_photo"]; $entry_result = $entry->save(); Gets me this error: Error: Exception: Unable to copy: /var/www/vhosts/straighttalkswitch.com/httpdocs/switch-it-to-win-it/site/assets/files//19feeda0a3882049c8815a9d69d7ef2d_cute-dog-dogs-13286656-1024-768.jpg => /var/www/vhosts/straighttalkswitch.com/httpdocs/switch-it-to-win-it/site/assets/files/38361/19feeda0a3882049c8815a9d69d7ef2d_cute-dog-dogs-13286656-1024-768.jpg (in /var/www/vhosts/straighttalkswitch.com/httpdocs/switch-it-to-win-it/wire/core/Pagefile.php line 109) #0 [internal function]: Pagefile->___install('/var/www/vhosts...') #1 /var/www/vhosts/straighttalkswitch.com/httpdocs/switch-it-to-win-it/wire/core/Wire.php(271): call_user_func_array(Array, Array) #2 /var/www/vhosts/straighttalkswitch.com/httpdocs/switch-it-to-win-it/wire/core/Wire.php(229): Wire->runHooks('install', Array) #3 /var/www/vhosts/straighttalkswitch.com/httpdocs/switch-it-to-win-it/wire/core/Pagefile.php(74): Wire->__call('install', Array) #4 /var/www/vhosts/straighttalkswitch.com/httpdocs/switch-it-to-win-it/wire/core/Pagefile.php(74): Pageimage->inst I'm running php 5.2.17 if that makes a difference, and yes the Page file folders are set to 777 Thanks for any help anyone could offer ( I could REALLY use it)
  11. HELP!!!! I've been building a back end in ProcessWire. All was going well until it spontaneously began throwing an error when I try and view my page list tree, rendering the entire back end useless. I'm developing locally on Mamp on a Mac. I get the following JavaScript Error: Uncaught TypeError: Object #<Object> has no method 'complete' JqueryCore.js:2 v.extend.ajax JqueryCore.js:2 v.(anonymous function) JqueryCore.js:2 v.extend.getJSON JqueryCore.js:2 loadChildren ProcessPageList.js:385 init ProcessPageList.js:119 (anonymous function) ProcessPageList.js:734 v.extend.each JqueryCore.js:2 v.fn.v.each JqueryCore.js:2 $.fn.ProcessPageList ProcessPageList.js:93 (anonymous function) ProcessPageList.js:17 l JqueryCore.js:2 c.fireWith JqueryCore.js:2 v.extend.ready JqueryCore.js:2 A The offending line seems to be: $.getJSON(options.ajaxURL + "?id=" + id + "&render=JSON&start=" + start + "&open=" + options.openPageIDs[0], processChildren); if I threw a try/catch around the 'document.ready' function and it throws an error - it gives me no other info -- just an error and an empty Object. I think it's to do with getting the jSon file. it's three days work down the drain and I'm up against a deadline!!!
×
×
  • Create New...