Jump to content

digitex

Members
  • Posts

    228
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by digitex

  1. I installed PW 2.5.3 into a sub-directory for development with the intention of moving it out and replacing the current site in the root directory (not really root, there are 2 sites hosted in one account through godaddy ). I had to edit the .htaccess file rewritebase on install to get it to work in the sub-directory: RewriteBase /newsf/ Ok so far but now that it's ready to launch I move everything, which I've done a bunch of times successfully, change the Rewritebase back and get these errors: Warning: strpos() [function.strpos]: Empty needle in /home/content/32/11070632/html/sf/newsf/index.php on line 49 Warning: require(/home/content/32/11070632/html/sf/newsf/wire/core/ProcessWire.php) [function.require]: failed to open stream: No such file or directory in /home/content/32/11070632/html/sf/newsf/index.php on line 86 Fatal error: require() [function.require]: Failed opening required '/home/content/32/11070632/html/sf/newsf/wire/core/ProcessWire.php' (include_path='.:/usr/local/php5_3/lib/php') in /home/content/32/11070632/html/sf/newsf/index.php on line 86 This is even after I deleted the /newsf/ sub-directory. I'm guessing I need to point the Rewritebase in the right direction but I don't know what that is. Has anyone ever dealt with anything like this and can offer some guidance?
  2. Thanks WillyC. That's good but still if you need to look for different things at different times it's no easier than doing a two stage search. Also thanks SiNNuT: I wasn't talking about the latest dev branch that's for sure but that is pretty much what I had in mind. Things change in pw faster than I can keep up.
  3. I've searched the forums and can't find any similar topic but if this has already been covered, forgive me. In the admin there's a search field in the top right corner. Unfortunately, by default it only searches the body and title fields but since pw allows and encourages developers to create all manner of custom fields to hold various data, the default search, in my experience, is not very useful. However, once the results are returned, we're presented with a lovely advanced search on the left that allows us to select the fields and templates, among other things, we want to search and then the results are very useful. But it's unavoidably a two stage process which doesn't seem very efficient. I'd love to see an advanced search button in the top corner beside the default search field that bypasses the first stage and allows you to immediately target the fields and templates you want to focus on. I can't find a way to do that so I'm hoping it could be on the roadmap for future releases. If there is a way to do this now, please pass it on.
  4. I agree with adrian. No offense Khan but there are issues with this module. Within the zip that's downloaded is a "site" folder which contains a templates folder and a modules folder containing both the frontend user profile module and the required select dropdown module. Simply uploading the whole thing to the modules directory won't work (the module itself is nested: modules > FrontendUserProfiles > site > modules > FrontendUserProfiles) which is why it can't be found. After I deleted everything including the select drop down (since I'd already installed that manually after reading the instructions that noted it was required) I was able to find the new module in the admin but when I attempted to install it I got this error: Unable to install module 'FrontendUserProfile': SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'profile-1' for key 2 I would like to see an easy to integrate, configurable user registration module but I don't think this is it, at least not in it's present form.
  5. I'm glad I asked. I never really believed it would be that simple. Thanks Adrian, I'll be doing some reading and upgrading on paypal.
  6. I love shop for processwire. So far it's coming along nicely. I'm trying to sell downloadable files and I have the shop working up to the point of going to paypal to process payment. I haven't gone further yet because I will need a way to deliver the product once paid for. I'm guessing the thank you return page Apeisa provides could be used to create a download link using the $session->order-id but...could it really be that easy?
  7. Hey Nico. I have this installed now and testing. I'm using pw 2.4.0 and first attempt worked as expected. So far no major problems at all. Nice work. This may become standard in each of my sites as it is often requested. I'll report back if I find a bug.
  8. It's strange. I updated to 2.4.3 which is the latest I could find dl'd today from the dev branch, and the checkbox field I have in the repeater with dependencies applied did not save. What am I doing wrong? I used a simple field=value and it works until you click save.
  9. Hi Renobird. I just upgraded the site in question to 2.4 but obviously not the latest dev as the dependencies aren't saving so I'll go grab it and see what happens. As for the PageTable, I love the idea but it came too late for this site. Converting it over would be monumental at this point so I'll look at it for the next project.
  10. I don't know if Ryan can be bullied into supporting field dependencies with repeaters but maybe he'll look at it if enough people chime in to request it. I have a repeater that's full of dependency potential. Empty text field that, if it contains data, needs a modifier field to appear. Categories that depending on which category is selected would require additional fields relevant to that category. etc. It would be very useful to streamline the interface and reduce potential user input error If I could only display the fields relevant to the data (all of which is contained within the same repeater. If the fields won't save, there's no point because chaos will ensue but if this could be made to work it would add a whole new level to repeater love from me. So...pretty please?
  11. Sorry to waste everyone's time. I figured it out after much panic. In my tests I had left include=all out of the selector for the repeater. Without that it was returning results while logged in as a superuser but not when using it as a guest. I finally clued in, added it and suddenly my life is rosy(er) again. Thanks to Craig, CStevens and Teppo for responding to my goofy panic.
  12. Thanks for the help teppo. PW is V2.4.? I grabbed a fresh copy this afternoon via the latest stable version link on the download page. That says 2.4.0 so don't know if it's as recent as yours. The code is basically the same as here: https://processwire.com/talk/topic/438-stumped-on-two-issues/page-2#entry63268 And it works perfectly as far as I can see, as long as you're logged in.
  13. I checked the repeater field. It looks right to me, published with access inherited from admin. I can't re-create the field itself, not wihtout re-populating more pages than I care to count, but the data does display on pages when not logged in, it just won't search unless logged in. I guess i could create e new repeater for testing and see if that will search. EDIT: I created a new test repeater and populated enough fields to test and got the same results. Logged in it returned expected result, logged out, nothing.
  14. I was afraid fo that. I did remove the access settings and deleted the entire template and created a new one and still no luck. However, I was able to revert to the old search and it works again, as it did without the updates. I started thinking it has to do with a mismatch in datetime format but that doesn't explain why it would work when logged in though.
  15. No Craig. I deleted the search page and template and recreated them both from scratch using a different name (find) and still only shows results when logged in. I checked the db and repaired, it found nothing wrong and no change. This behaviour is not browser based either. I used a different computer and got no results when not logged in. It's live and I can't revert to the old version.
  16. I just uploaded the pages for the new search I've been working on that includes a date search, location & capacity search and now when I search for location or capacity I get results but when I search for date range I get no results. BUT If I log in I do get results for date range. While working on the test I had set access permissions for the test template to superuser only but there is nothing in the code for the search that would restrict results to only show when logged in and the search template is different from the testsearch. What could cause there to be no results displayed when not logged in? EDIT: The dates are stored in a repeater. The repeater template has no access restrictions. EDIT 2: I changed the output formatting on the dates to match the format of the input from the search form and still no luck. I upgraded to pw 2.4 before starting the overhaul of the search. The old code continued to work though and the tests worked as long as I was logged in.
  17. Nik you are a godsend. you're right and I slap my head for going in circles for so long. I noticed that if(!$property->viewable()) continue; was a filter of sorts already as it removes non-viewable items and I should have clued in that that was where to try to filter results from the other parameters but this line if(!$property->matches($filterSelector)) continue; is something I've never seen before and it works great. I'll remember it. It's gratifying to know that when you reach the limit of your abilities you can still come here and get access to such an enormous well of knowledge and insight. Thank you again.
  18. I went back to the drawing board and tried a different approach and that didn't work either. i feel like I'm close and just missing something but maybe not. Maybe I need to go in a completely different direction. I'm getting desperate. Any thoughts would be appreciated.
  19. Me again. A big thanks again to Nik for his post on the first page of this thread. I got the date range search working very well and for a while everything was peachy. Now, we want to add additional attributes to the search to go with the availability dates. The region and capacity of the properties is being added (possibly more later but I'll cross that bridge when I get to it. We want the date range, region(location) and capacity to be searchable together or separately and I have reached the limit of my very limited knowledge. I have the data fields on the same page as the repeater that contains the dates and booked status and although I got the date range search to work on it's own and the region/capacity working on it's own, I can't get them to work together. I hoped I could find all property pages matching the $selector and then refine that with the availability search but I can't make it work. The code I have now is: <?php $out = ""; $selector = ""; if($input->get->region) { $loc = ($input->get->region); $selector .= "location=$loc, "; $input->whitelist('region', $loc); } if($input->get->capacity) { $cap = ($input->get->capacity); $cap = (int) $cap; $selector .= "sleeps>=$cap, "; $input->whitelist('capacity', $cap); } if($input->get->requestfrom && $input->get->requestto) { $fromvalue = $sanitizer->selectorValue($input->get->requestfrom); $tovalue = $sanitizer->selectorValue($input->get->requestto); $input->whitelist('requestfrom', $fromvalue); $input->whitelist('requestto', $tovalue); $start = new DateTime($fromvalue); $interval = new DateInterval('P7D'); $end = new DateTime($tovalue); $period = new DatePeriod($start, $interval, $end); $all = $pages->find("template=property_availability, $selector, sort=cottage_name"); $cottages = array(); foreach($period as $term) { $df = $term->format("m/d/Y"); $dt = $term->modify("+7 days")->format("m/d/Y"); $matches = $all->find("rental_period.date_from>=$df, rental_period.date_to<=$dt, rental_period.booked=0"); if(!count($matches)) { $cottages = array(); break; } $termCottages = array(); foreach($matches as $property) { if($property->viewable()) continue; $termCottages[] = $property; } if(count($cottages)) $cottages = array_intersect($cottages, $termCottages); else $cottages = $termCottages; } } else { $cottages = $pages->find("$selector, sort=cottage_name"); } $uniqueResults = array(); foreach($cottages as $cottage) { $uniqueResults[$cottage->parent->parent->title]=$cottage->parent; } $total = count($uniqueResults); if($total) { $out .= "<h2>{$total} results for.</h2>"; $out .= "<ul>"; foreach($uniqueResults as $m) { $out .= "<li class='result'><a href='{$m->url}'>{$m->parent->cottage_name}</a><br><span><em>Location: {$m->parent->address} | Sleeps: {$m->child->sleeps}</em></span></li>\n"; } $out .= "</ul>"; } else { $out .= "<h2>Sorry, no results were found.</h2>"; } ?> If searching just for date range it returns every property regardless of date searched or booked status and if searching for date range, capacity and/or region together it ignores the dates and returns the other attributes, correctly. I hope there's just something wrong with the way I'm targetting the repeater fields but everything i've tried has failed. Does anyone have a suggestion on where I went wrong? i could use the help. Thanks in advance.
  20. I thought I'd report back here on a discovery. I was doing a routine search on a site that uses the highlighting method described here and on one page it wasn't working. I tracked it down to template caching. For anyone looking to use this, something to be aware of.
  21. Adrian is correct. I was referring to the maxfilesize in the module at line 36. If that's not being used then I have no idea what to say. I have several images uploaded successfully through the module but the largest I have been able to get though is 1,067Kb. I have another in there that is 3,396kb that failed through ImagesManager but I was able to upload by going directly to /images/category-1/ create new page and upload by normal pw method. I will contact my host admin and get the max increased, maybe that will fix it. Still weird.
  22. Where did you get 2.4.1? The latest version I can find is 2.4.0.
  23. Thanks Adrian but if the server php.ini was the problem then any image I upload whether using the images manager module or using the images field that exceeds the limit would fail. Wouldn't it? If I go to a page and use the images field to select and upload a 2mb or 3mb image is succeeds but not through this module. I'm making the assumption it's not the server's php.ini.
  24. Hey Soma. Very useful module and it has promise to be just what I need for something I'm working on right now but I have a couple of questions: First, I need to upload images of a higher resolution but when I upload through the module interface I get an error that the file exceeds the maxFilesize set in the php.ini. The php.ini maxFilesize is set to 10mb and the pics, so far, have been well below that. When I use the standard pw image upload the files go up no problem but error out using the module. I notice you set a maxFilesize => 32 default but when I change that it doesn't make any difference. Can you give me some guidance how to set it to match the limit in the server php.ini? Also it might be worth considering adding an option in the module settings to set the maxFilesize. Second, I sometimes forget to set the category before clicking upload and I found that rather than throw an error immediately, the module goes through the process of uploading the file first, then throws the error that no category was set. Since the file's already uploaded, it get's left orphaned in the temp directory. I went into the assets > files > .tmp_uploads and found several pics from days earlier still in there. I can't be the only one that sometimes forgets to set a category which means the server could get clogged with orphaned files pretty quickly. Maybe an onsubmit check for the category before upload begins would fix that.
×
×
  • Create New...