Search Results

Search found 4 results on 1 pages for 'easement'.

Page 1/1 | 1 

  • Drupal 5 Search not working on 404 pages.

    - by easement
    I have a <?php print $search_box; ?> in my page.tpl.php page. On pages that exist, the search works, but on 404 pages, it does not. I saw some bugs/patches threads over at drupal.org for D6.15, but none of them seem to work according to the thread and they weren't really relevant to D5.x I have a theory that the because the <?php print $search_box; ?> creates a form with an action to itself(a non-existant page), it'll get the 404. Has anyone run up against this? If so, how did you fix it? One theory I has was to somehow tap into the form and always make the action="/" (front page) which would always exist. If this is a good idea, how does one go about tapping into the FormAPI and overwriting the action? Is it a preprocess function?

    Read the article

  • Drupal - editing tab options for a content type not showing up

    - by easement
    I'm working on a D5 site and a lot of the content types have the menus at the top of the edit page. Examples: Overview | Grants | Dev load | Dev render | Edit | Revisions | Track | Workflow Overview | Dev load | Dev render | Edit | Revisions | Track | Workflow | Node queue | RelatedContent I'm not sure where these tabs come from, but I need to enable the menu for a content type that doesn't have them visible. I checked the workflow setting and the content type in question was specified to use workflow. So there should be at least another tab in addition to edit. The end goal is to have revisions show up in the menu, but I need to get the menu showing first. Any ideas where to start looking?

    Read the article

  • Ruby on Rails - Currency : commas causing an issue.

    - by easement
    Looking on SO, I see that the preferred way to currency using RoR is using decimal(8,2) and to output them using number_to_currency(); I can get my numbers out of the DB, but I'm having issues on getting them in. Inside my update action I have the following line: if @non_labor_expense.update_attributes(params[:non_labor_expense]) puts YAML::dump(params) The dump of params shows the correct value. xx,yyy.zz , but what gets stored in the DB is only xx.00 What do I need to do in order to take into account that there may be commas and a user may not enter .zz (the cents). Some regex and for comma? how would you handle the decimal if it were .2 versus .20 . There has to be a builtin or at least a better way. My Migration (I don't know if this helps): class ChangeExpenseToDec < ActiveRecord::Migration def self.up change_column :non_labor_expenses, :amount, :decimal, :precision => 8, :scale => 2 end def self.down change_column :non_labor_expenses, :amount, :integer end end

    Read the article

  • Apache/PHP serving file multiple times

    - by easement
    I have a system with a download.php page. The page takes and id and loads a file based on from the DB Record and then serves it up. I've noticed a couple instances where files are requested multiple times in short time spans (20ms). Times that are too quick for human input. There are plenty of instances where the downloader functions fine. However, in taking a closer look at the downloader’s usage, I did see some interesting behavior. For instance, the IP address xxx.xxx.xxx.xxx (which is one in a range owned by xxxxxx.de in Germany) came to the site through Google. They browsed around and then came to the page http://site.com/xxxx/press+125.php There they issued a request for /download.php?id=/ZZ/n+aH55Y= (a PDF) at 9:04:23AM. That alone is not a big deal. However, what is interesting is that the server seems to have been quite preoccupied with serving that request. In the logs the request first completes between 9:09:48 and 9:10:00. It looks like the user must have gotten tired of waiting during that time and requested the document two more times. Between 09:14:47 and 09:15:00 the same request appears again, except it is from 9:04:43AM, 20ms later than the first request. Then it pops up a third time, with a request that started at 09:05:06 completing between 09:19:55 and 09:19:58! I’m suspicious of that document. In looking through the logs I see other instances where it takes the server a little while to handle that specific file. Check out this list of requests from zzz.zzz.zzz.zzz[different than above] for the file /download.php?id=/ZZ/n+aH55Y= (the same docuemnt as before): Request time Complete Time 04:32:43 04:33:36 04:32:50 04:33:36 04:32:51 04:33:38 04:33:05 04:33:38 04:33:34 04:33:42 04:33:05 04:33:42 So something is definitely going on. Whether it has to do with this specific document tripping up the server, the download.php page’s code, or if we’re just seeing the evidence of some server level overload as it plays out in real time I’m not yet sure. In fairness, there are other instances of people downloading /download.php?id=/ZZ/n+aH55Y= (the same PDF) without error. However, it is interesting that the multiple processes only seem to happen with this one file, and then only when it is accessed through the page http://site.com/press+125.php . It bears further investigation if there’s something amiss inside the code that causes the system to fire off multiple download requests that occupy the server. I don't know if this press+125.php is a rabbit hole, but there is weird consicence. Any ideas? I'm totally out of ideas. Apache maxed out? Things like that. ///DOWNLOAD.php $file = new files(); $file->comparison_filter("id", "=", $id); //sql to load if ($file->load()) { $file->serve(); } //FILES function serve() { if ($this->is_loaded) { if (file_exists($this->get_value("filename"))) { if ($this->get_value("content_type") != "") { header("Content-Type: " . $this->get_value("content_type")); } header("Content-Length: " . filesize($this->get_value("filename"))); if ($this->get_value("flag_image") == 0 || $this->get_value("flag_image") == false) { header("Cache-Control: private"); header("Content-Disposition: attachment; filename=" . urlencode($this->get_value("original_filename"))); } set_time_limit(0); @readfile($this->get_value("filename")); exit; } } }

    Read the article

1