Jump to content


  • Posts

  • Joined

  • Last visited

Everything posted by Jon

  1. Hello Guys, Thanks for the help I disable mod_security on the account & development site and that has resolved the issue! Confusing as I haven't had it before! Thanks for the Options -indexes tip Cheers Guys
  2. The hosting company got back to me and said they disabled some rules but iam still getting the same issue. Ive managed to find the Mod_Security log and seem to be getting the following Request: GET /pw/site-manager/page/ Action Description: Access denied with redirection to http://www.rossofmullbunkhouse.co.uk/ using status 302 (phase 2). Justification: Pattern match "(?i:(?:[\"'`]\\s*?\\*.+(?:x?or|div|like|between|and|id)\\W*?[\"'`]\\d)|(?:\\^[\"'`])|(?:^[\\w\\s\"'`-]+(?<=and\\s)(?<=or|xor|div|like|between|and\\s)(?<=xor\\s)(?<=nand\\s)(?<=not\\s)(?<=\\|\\|)(?<=\\&\\&)\\w+\\()|(?:[\"'`][\\s\\d]*?[^\\w\\s]+\\W*?\\d\ ..." at REQUEST_COOKIES:pagelist_open.
  3. Hello, I disabled Mod_Security and it resolved the issue so I have passed this onto the hosting company as Its a bit over my head! This is what Mod_security seems to be picking up [Mon Jan 02 14:38:14.099831 2017] [:error] [pid 17088] [client] ModSecurity: Access denied with redirection to http://rossofmullbunkhouse.co.uk/ using status 302 (phase 2). Pattern match "(?i:(?:,.*?[)\\\\da-f\\"'`][\\"'`](?:[\\"'`].*?[\\"'`]|\\\\Z|[^\\"'`]+))|(?:\\\\Wselect.+\\\\W*?from)|((?:select|create|rename|truncate|load|alter|delete|update|insert|desc)\\\\s*?\\\\(\\\\s*?space\\\\s*?\\\\())" at REQUEST_COOKIES:InputfieldImage. [file "/etc/apache2/conf.d/modsec_vendor_configs/OWASP/rules/REQUEST-42-APPLICATION-ATTACK-SQLI.conf"] [line "82"] [id "981257"] [rev "2"] [msg "Detects MySQL comment-/space-obfuscated injections and backtick termination"] [data "Matched Data: ,\\x22listSize\\x22:23, found within REQUEST_COOKIES:InputfieldImage: JSON{\\x22header_image\\x22:{\\x22size\\x22:130,\\x22listSize\\x22:23,\\x22mode\\x22:\\x22left\\x22},\\x22images\\x22:{\\x22size\\x22:130,\\x22listSize\\x22:23,\\x22mode\\x22:\\x22grid\\x22}}"] [severity "CRITICAL"] [ver "OWASP_CRS/3.0.0"] [maturity "9"] [accuracy "8"] [tag "Host: rossofmullbunkhouse.co.uk"] [tag "application-multi"] [tag "language-mutli"] [tag "platform-multi"] [tag "attack [hostname "rossofmullbunkhouse.co.uk"] [uri "/pw/site-manager/page/edit/"] [unique_id "WGpl1oBzb5WYMc2t5l7ddQAAAA0"] Cheers Jon
  4. Hello, I have tired a clean install which works fine. I then transferred all my site files over to the clean install worked fine. Then I imported my database and ended up with the same issue on save/edit redirect to the home page. Server information Iam not 100% as its a managed VPS. I have another of other PW site running on it without any issue (Not PW 3.0.42) mod_security is enabled. Cheers Jon
  5. Ive move this site to the actual domain and get the same problem when I login to "Admin" and click edit Iam redirected to the home page. Iam using PW3 .htaccess seems to be working aswell.
  6. Hello, I have a test site setup on my domain in a folder Iam having a slight issue I can login to the admin fine but when I try and edit any page or add a new page and save iam redirected to the root of the domain any ideas? Cheers Jon
  7. Hello Robin, Thanks for that using $page->rootParent solved the issue. I've taken a look into MarukpSimpleNavigation Ill definitely used that next and save myself some work Many Thanks
  8. Hello All, Iam trying to figure out how to list all pages in a sidebar steaming from parent page after the home. For example my sitemap is Home --Gallery ---Boats ---Wildlife ----Birds So for my sidebar I would like to list from Gallery all the way down to birds. Including Gallery at the top I've managed to get the sidebar working on Gallery but as soon as I head into a child I lose the Parent. The code Iam using is hashed up of a couple of other Topic on the forums. $p = $page; $out =""; if ($p->numChildren) { $out .="<div class='sub-pages'>"; $out .="<ul class='menu vertical'>"; if ($p->id == $page->id) { $out .= "<li><a class='active' href='{$p->url}'>{$p->title}</a></li>"; }else{ $out .= "<li><a href='{$p->url}'>{$p->title}</a></li>";}} foreach($p->children as $child) { // check if this child is in parents or direct parent of current page if($page->parents->has($child) || $child === $page || $child === $page->parent) $class = "active"; else $class = ''; if (strlen(trim($child->link_text)) > 0){ $link = $child->link_text;} else {$link = $child->title;} $out .= "<li><a class='$class' href='{$child->url}'>{$link}</a>"; //if ($class=="active") { if($child->numChildren > 0){ // check if this child is in parents or direct parent of current page $out .= "<ul class='menu vertical'>"; foreach($child->children as $childchild) { if($childchild === $page || $childchild === $page->parent) $class = "active"; else $class = ''; if (strlen(trim($childchild->link_text)) > 0){ $link = $childchild->link_text;} else {$link = $childchild->title;} $out .= "<li><a class='$class' href='{$childchild->url}'>{$link}</a></li>"; } $out .= "</ul>"; } //} $out .= "</li>"; } $out .= "</ul>"; $out .= "</div>"; echo $out;
  9. Hey guys thanks for the input. I went with the option from Robin just reading up on URL segments now as that looks like a even better option. Cheers Jon
  10. Hello All, I am just wondering what is the best way to get a specific row of a repeater. I have a list of courses stored in a repeater. On my parent page i will list all the courses/dates and when. What I planned on doing was getting the ID of the row in a GET and then showing the content of the repeater row on the booking page. Can this be done without using a foreach? Cheers Jon
  11. I've changed my code to use ===NULL I can now save 0 but if cruise_spaces is NULL the fields arent getting set. The full code I am using is below if that help. Ive use !==NULL to test the section of code that sets the spaces and that works fine $this->pages->addHookAfter('saveReady', null, 'cruiseSpaces'); function cruiseSpaces($event) { $page = $event->arguments[0]; if($page->cruise_spaces === NULL) { if($page->vessels->id == 1039) { $page->cruise_spaces = 12; $page->cruise_single = 2; }else if ($page->vessels->id == 1041 || $page->vessels->id == 1042) { $page->cruise_spaces = 11; $page->cruise_single = 2; }} }
  12. Thanks Sinnut, I already have that tick but empty and "0" are being treat the same any other ideas? Cheers Jon
  13. Hello All, I have a integer field for a number of spaces. In ready PHP. Iam looking to check the spaces field and if its NULL (empty) set the value and if it not empty just leave it. However when the spaces get to 0 this is setting my field back to the default number of spaces. Ive tried isset() empty() but seem to be getting the same result. Any ideas how to solve this? The code I am using is below. if($page->vessels->id == 1039 && !$page->cruise_spaces) { $page->cruise_spaces = 12; $page->cruise_single = 2; } Cheers Jon
  14. Hello guys thanks for the response, I did reply to this yesterday but must have forgot to post it doh! I managed to get the site working after following pwired advice and replacing the site directory, debug worked. Which showed a problem with the AssistedURL field type module. So I updated that and seemed to work. Which was a bit of odd one as the site worked when I tested it on another server and domain. Maybe something server related. SteveB iam using php5.5 The site is http://redmooncruises.co.uk if anyone's interested. Still got a few things to tidy up. Cheers Jon
  15. Hello all, I seem to be having trouble moving a site to new hosting / domain. Just getting a 500 internal error. I have tried the following. 1. Commenting out .he access lines. 2. Installed the site onto another domain and different hosting with worked fine. 3. Install a new copy of pw onto the domain and hosting in question which worked. Iam not really getting any other error massages to just wondering if anyone has had something similar. Iam using processwire3
  16. Hello, Iam just wondering is this would be the right away to go about this. So I have a order form on my site which will store my order as a $session before transferring away to my payment gateway (WorldPay). I'll be passing the order number from the $session within payment. Once the payment has been processed/cancel/declined the user will be redirected back to a confirmation page which will display the relevant information and if the order is process ill be using the $session data to generate a order (page) Iam just wondering if that's a ok use of $session? Cheers Jon
  17. Thanks both works great now. Such a useful module!
  18. Hello, How do you add "InputfieldPageListSelect.min.js" to the module to fix the 0 issue with the link field? Ive tried hooking into the "InputfieldPageListSelect::render" but couldnt get it to work.
  19. That's prefect Jan exactly what I was trying to achieve! Many thanks Jon
  20. Hello Mr Fan, That is similar to the code I've used, But doesn't set the template. Basically what I have is a parent "Reviews" which can have 3 different Child templates. When dashboard button is press I would like to set a specific template or even if I could set a default template but still have the option of selecting the 2 other templates. What happens at the minute is the last template used if remembered. Cheers Jon
  21. Hello all, Just wonder if it's to add a new button on custom admin page that adds a new page with a specific template. I have got the parentid within the button link that works but would really like to set the template aswell. Cheers Jon
  22. Hello Guys, Thanks for the responses. Turned out to be that my SQL import was only importing half the tables managed to get it sorted. Thanks for your help again! Cheers Jon
  23. Hello Guys, Ive just moved a site over to a test server but I am now getting the following error. Any ideas? Error: Exception: Field does not exist: top_nav (in /home/clearbox/public_html/clients/ml/wire/core/PageFinder.php line 538) #0 [internal function]: PageFinder->___getQuery(Object(Selectors), Array) #1 /home/clearbox/public_html/clients/ml/wire/core/Wire.php(398): call_user_func_array(Array, Array) #2 /home/clearbox/public_html/clients/ml/wire/core/Wire.php(333): Wire->runHooks('getQuery', Array) #3 /home/clearbox/public_html/clients/ml/wire/core/PageFinder.php(280): Wire->__call('getQuery', Array) #4 /home/clearbox/public_html/clients/ml/wire/core/PageFinder.php(280): PageFinder->getQuery(Object(Selectors), Array) #5 [internal function]: PageFinder->___find(Object(Selectors), Array) #6 /home/clearbox/public_html/clients/ml/wire/core/Wire.php(398): call_user_func_array(Array, Array) #7 /home/clearbox/public_html/clients/ml/wire/core/Wire.php(333): Wire->runHooks('find', Array) #8 /home/clearbox/public_html/clients/ml/wire/core/Pages.php(216): Wire->__call('find', Array) #9 /home/clearbox/public_html/clients/ml/wire
  24. Just wondering how you would go about changing the icon for custom admin pages?
  25. Thank you guys, used the following $this->pages->addHookAfter('saveReady', null, 'order_number'); function order_number($event) { $page = $event->arguments[0]; if($page->template != 'booking') return; if(!isset($page->booking_orderno)) { $max = wire('pages')->get("template=booking, sort=-id"); $lastNumber = $max->booking_orderno +1; $page->booking_orderno = $lastNumber; } }
  • Create New...