Jump to content

MarkE

Members
  • Content Count

    153
  • Joined

  • Last visited

Community Reputation

30 Excellent

About MarkE

  • Rank
    Sr. Member

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Except that, in the 'before' hook, the test is is_null() because the default 'true' value has not been set. The second time, the argument will be 'false', which is not null 😉
  2. Aha! So a better way to avoid the hook being called twice would be to test for the 'save' argument. In my case I can't use the trashed hook as I need to access the parent of the page being trashed, which is too late if it has been trashed.
  3. I know it's a long time since the last post, but this still seems to be an issue in 3.0.123. It's easily avoided by setting a flag to prevent repeats (see below), but is it a bug or a side-effect of some intended behaviour? wire()->addHookBefore('Pages::trash', function ($event) { $p = $event->arguments(0); if ($this->skip != $p->id) { $this->skip = $p->id;
  4. OK, I cleared FileCompiler. Any ideas why it would suddenly go awry? (BTW, I should add that it all seems to be working now. Thanks for the quick responses!)
  5. It was set to true - that's how I was able to identify files with the missing namespace statement. Adding namespace ProcessWire; seems to fix the errors, but why is it suddenly a problem??? I have changed no settings. In fact I hadn't touched the site since it was working fine yesterday - a user then alerted me to the problem this afternoon. The hosting service say they haven't changed anything either. The .htaccess is unchanged as is the php config. 🤔
  6. PW v 3.0.123 I haven't upgraded since the original installation PHP 7.2 I have raised a query with the hosting service Adding namespaces seems to be fixing it (at least partially - still more to do), but I've no idea why it was suddenly a problem (and a lot of modules do not have namespace statements.
  7. One of my sites has just crashed and gives server 500 errors. Looking at the logs, the cause is multiple fatal errors of the type: Fatal Error: Uncaught Error: Class '\ProcessRedirects' not found Inspecting the code, it seems like the namespace ProcessWire; statement is missing in many of the modules and this seems to be causing the error. I'm inserting the statement as I get each error and each time I get a new instance. The odd thing is that the code has not been changed recently (apart from one Hanna code which was working yesterday). The problem only started this afternoon. Is my diagnosis correct and, if so, what might have caused this to suddenly start giving fatal errors.
  8. That's useful to know about, but my tests showed that a simple %20 -> + fix would still have got a 403. Exactly how the rule operates, and therefore what if any replacement might defeat it, is not clear to me.
  9. Looks like my friendly hosting provider installed new security without telling the customers: "This site is hitting a firewall security rule: COMODO WAF: URL Encoding Abuse Attack Attempt" I got them to disable it, but I wonder whether others might hit the same issue? @netcarverDoes it raise questions about PW's use of url parameters? Quote from hoster: "We automatically update our firewalls with the latest security rules provided by multiple vendors to ensure they are as effective as possible."
  10. It's not at all clear what's causing it. Removing the %20s or replacing them with + doesn't work. Here is a list of tests: ?abc=abc&get={xxx}%20{xxx} - forbidden ?abc=abc&get={xxx}{xxx} - OK ?abc=abc&get=xxx%20xxx - OK ?abc=abc&get={xxx}%20xxx - forbidden ?abc=abc&get={xxx}+{xxx} - OK /search/for?&templates_id=64&status%3C2048&limit=50&format_name=autocomplete_list_members - OK /search/for?&templates_id=64&status<2048&limit=50&format_name=autocomplete_list_members&get={firstname} - forbidden /search/for?&templates_id=64&status<2048&limit=50&format_name=autocomplete_list_members&get=firstname - OK /search/for?&get={firstname} - OK (%3C gets replaced by < in browser URL) 😬 I haven't touched .htaccess or any settings on cPanel. The .htaccess file on the live site just differs from the website because cPanel adds the php7.2 settings: # php -- BEGIN cPanel-generated handler, do not edit # Set the “ea-php72” package as the default “PHP” programming language. <IfModule mime_module> AddHandler application/x-httpd-ea-php72 .php .php7 .phtml </IfModule> # php -- END cPanel-generated handler, do not edit # BEGIN cPanel-generated php ini directives, do not edit # Manual editing of this file may result in unexpected behavior. # To make changes to this file, use the cPanel MultiPHP INI Editor (Home >> Software >> MultiPHP INI Editor) # For more information, read our documentation (https://go.cpanel.net/EA4ModifyINI) <IfModule php7_module> php_flag display_errors Off php_value max_execution_time 120 php_value max_input_time 480 php_value max_input_vars 1000 php_value memory_limit 128M php_value post_max_size 20M php_value session.gc_maxlifetime 1440 php_value session.save_path "/var/cpanel/php/sessions/ea-php72" php_value upload_max_filesize 20M php_flag zlib.output_compression Off </IfModule> <IfModule lsapi_module> php_flag display_errors Off php_value max_execution_time 120 php_value max_input_time 480 php_value max_input_vars 1000 php_value memory_limit 128M php_value post_max_size 20M php_value session.gc_maxlifetime 1440 php_value session.save_path "/var/cpanel/php/sessions/ea-php72" php_value upload_max_filesize 20M php_flag zlib.output_compression Off </IfModule> # END cPanel-generated php ini directives, do not edit Looks like I need to raise an issue with the hoster?
  11. It seems like its the %20 that's causing the problem - but it never has before - I wonder what they can have done. Nothing in any logs.
  12. Playing around with the url which gets the 403, it works until I get to the parameter &get={firstname}%20{lastname}%20-%20{email} In other words, the following is not forbidden: https://ncorchards.co.uk/admin123/page/search/for?&templates_id=64&status<2048&limit=50&format_name=autocomplete_list_members but adding the &get=... parameter results in the 403
  13. I have now! Failed to load resource: the server responded with a status of 403 () (for address ncorchards.co.uk/admin123/page/search/for?..........etc)
  14. Page auto-complete has just stopped working on my site. It is still working on my dev machine (with the same code) - I've copied the live database to the dev machine and it works there. All the other page-select methods work OK, so my temporary work-round is to change the selection method for the affected fields - but this is rather messy for fields where there are a great many pages to choose from. Any ideas? I'm wondering if my hosting service might have changed something to do this, but I can't think what. There are no error messages or logs - the field is just unresponsive when I type into it. I'd be most grateful for any clues or suggested lines of enquiry.
  15. Hi @formulate - I'm using the module, without any problems, from Outlook and other email clients. So I'm not sure it's anything about Outlook per se. Have you checked what are the restrictions on sending addresses?
×
×
  • Create New...