Peter Falkenberg Brown

  • Content count

  • Joined

  • Last visited

  • Days Won


Peter Falkenberg Brown last won the day on September 25 2014

Peter Falkenberg Brown had the most liked content!

Community Reputation

116 Excellent

About Peter Falkenberg Brown

  • Rank
    Sr. Member

Contact Methods

  • Website URL

Profile Information

  • Gender
  • Location
    Maine, USA
  • Interests
    Writing, publishing, public speaking, video blogging
    on spirituality and the mystical path.

    YouTube Channel: "Love, Freedom, & the World"

    @falkenbrown -


Recent Profile Visitors

7,278 profile views
  1. Peter Falkenberg Brown

    Hi Macrura, You are exactly right. I don't remember placing this line in the module backend data field "Default Link to XSL Stylesheet" "/site/templates/styles/rss_feed.xsl" but it was there. So, I removed it, and then uncommented the line in the module, and all was well. I suppose I could have placed that value in the data field: I just don't remember doing so, and never had that file on my system. Oh well... mystery solved, and the module has no error. It was human error! Oy. Ugh. Thank you VERY much for clarifying this. Peter
  2. Peter Falkenberg Brown

    Hi Dragan, Yep, that worked. This is the line that I had to comment out: /* if($this->xsl) $out .= "<?xml-stylesheet type='text/xsl' href='{$this->xsl}' ?>\n"; */ This would be a good thing to fix in the module, I do believe. This is one of Ryan's core modules, I think. Thanks! Peter
  3. Peter Falkenberg Brown

    Hi Ryan and Team, I'm using the module "RSS Feed Generator" v1.0.2, in PW 3.0.42. (I'm going to upgrade when 3.1 comes out.) I just noticed that my rss feed here: doesn't display anything in Chrome (but works in Firefox). (The source xml is being generated.) I also saw that Chrome requires an RSS extension to display RSS: so I installed it, but still nothing. I then went to the NY Times and saw that their feed worked in Chrome *if* the extension was installed. I compared the raw xml at the NY Times against the raw xml in my feed, and saw a significant difference. However, since the xml is generated by the module, I didn't really want to mess with it. Here are the two snippets from the headers. (The rss tree looks similar -- it's just the first set of declarations that look different.) RSS FEED GENERATOR AT SIGNIFICATOJOURNAL.COM: <?xml version='1.0' encoding='utf-8' ?> <?xml-stylesheet type='text/xsl' href='/site/templates/styles/rss_feed.xsl' ?> <rss version='2.0' xmlns:dc=''> NY TIMES FEED: <rss xmlns:dc="" xmlns:media="" xmlns:atom="" xmlns:nyt="" version="2.0"> I believe that the module should be modified, for Chrome support. Any thoughts? Thanks! Peter
  4. Peter Falkenberg Brown

    Dear Abdus, That worked! Thank you! Really appreciate help from you, and BitPoet, and OF COURSE, Ryan and team for making such a great CMF! Peter
  5. Peter Falkenberg Brown

    Hi Abdus, Thanks.... I tried that based on your comment, and I got this error: Error: Class 'Page' not found... Peter
  6. Peter Falkenberg Brown

    Dear BitPoet, Thanks very much for this! I could just feel in my bones that I had forgotten something wonderful about PW. I think I saw that blog post in my email when it came out, but then the info didn't stick in my brain. I'm able to read the data from "DOMAIN_1" but when I try to save it into DOMAIN_2, the page object still belongs to DOMAIN_1 and gets saved into that domain. I have some generic code below. # FileCompiler=0 require('/home/DOMAIN_1/public_html/wire/core/ProcessWire.php'); $DOMAIN_1_site = new \ProcessWire\ProcessWire('/home/DOMAIN_1/public_html/', ''); $DOMAIN_1_selectors = "SELECTORS HERE"; $DOMAIN_1_results = $DOMAIN_1_site->pages->find("$DOMAIN_1_selectors"); foreach ( $DOMAIN_1_results as $DOMAIN_1_result ) { $DOMAIN_1_url = $DOMAIN_1_result->url; $DOMAIN_1_name = $DOMAIN_1_result->name; . . . more fields here . . . #........................................................................ ### CODE HERE TO INSERT DOMAIN_1 PAGE INTO DOMAIN_2 $DOMAIN_2_site = new \ProcessWire\ProcessWire('/home/DOMAIN_2/public_html/', ''); $DOMAIN_2_new_page = new \ProcessWire\Page(); # THIS BREAKS: $DOMAIN_2_new_page is still attached to DOMAIN_1 # and gets saved into the domain 1 database. . . . more code here . . . } Any help is much appreciated. Seems like I'm not properly initializing the vars for DOMAIN_2. Thanks! Peter
  7. Dear PW Gurus, I searched and didn't find this answer -- hope I didn't miss something. I have 3 production installations of PW on my server --- 3 different domains. I'm developing a PHP script that will run from the shell prompt, and pull a certain number of pages from domain A, and then insert those pages into domain B and C. (The field template structure is identical between the 3.) My script starts by connecting to the PW installation for domain A by using this include: include("/home/USER_DIR/public_html/index.php"); which of course connects the script to that particular database. (All 3 domains use a separate DB and separate installation of PW.) Install A uses PW v3.0.61 running under CentOS. I think I'm missing some wonderfulness in PW, but I'm stumped over how to take the data from A and then do an include statement to the B install (to insert the pages into B) and then do the same thing with C. I would think that the second statement: include("/home/USER_DIR_B/public_html/index.php"); would conflict with all of the variables, etc that are pulled in with the first include, and then so on, with "C." Is this a perfect examples of why someone should use name spaces? I admit that I've never used them, so I'm at the bottom rung of knowledge about the syntax, etc, to do that. The script is truly uncomplicated, otherwise, ie. - read 3 or 4 pages worth of fields into variables - insert them into B and C's installations. - done. Any thoughts? I'm running this script as root, (which I've done with the "A" part, so that the permission issue would not be a problem. Thanks in advance for any help! Peter
  8. Peter Falkenberg Brown

    Dear Robin and BitPoet, Wow!! This is why I love ProcessWire. The details above are exactly what I need. And of course it was already there --- I just hadn't kept up to date with all of the new documentation, during the last couple of years when I was focused on other projects besides PW app development. So... gotta catch up. Thanks to you both! Peter
  9. Peter Falkenberg Brown

    Hi Robin, Thanks... that code is clear and understandable. I think I'm a bit stuck on the fact that I'm not using template files with this app --- I'm only accessing the data from the admin pages, so unless I'm missing something, I would think that the code above would have to be incorporated into one of the admin template files. Is that correct, and if so, any thoughts on which one? One of the downsides of copying out the admin template files to the site directory, in my opinion, is that the default admin template files get overwritten on certain updates. Kind of messing with the core, in my opinion. I think it would be really cool if PW had an add-on module which could define a calculated field like this. Or even make it a special "calc" field type. Yours, Peter
  10. Peter Falkenberg Brown

    Hi Robin, Although I've built large front end apps with PW's API, I've never tried to modify the admin back end. Based on the interface that it has, I'm under the impression that one would have to modify the files under wire/templates-admin, or make a copy of the admin template into the site folder and modify code there. Do you have any tips on the best way to achieve your idea above? Are there any examples of this type of Pages::saveReady call that you know of? Thanks! Peter
  11. Hi All, I might have missed something, but I couldn't find this... I'm looking for a field type that will calculate a result based on numeric values in other fields in the same page, and store the data when the page is saved, and update it when the values change. (Rather than just displaying the values dynamically at run time, although I suppose that would be better than nothing.) I.e. "order_total" = "quantity" * "unit_price." with order_total being the calculating field type. Of course, I could write template php files that do this, but I'm trying to wrestle with the 3.x admin pages to essentially record data for an ordering system that will only be used by internal staff, so that I don't have to design a complete front-end for the system. I've got the customer field set, and the items, and the sales (i.e. "orders") pages set up. I'm trying out the repeater field to handle multiple items in one order, i.e. 4 copies of this, 10 copies of that, all pulled with page select fields from the items "table." (Rather than create one page for each "order item".) Most orders won't have more than 1 or 2 items, and I think they would max out at less than 10 order items. A native "calc" field type would help tremendously, or an admin spot to tell a float field to run a php file when saving or updating the page, that would do the calculations, would also work. Thanks! Peter
  12. Peter Falkenberg Brown

    Thanks, Robin, for that explanation. The # FileCompiler=0 declaration was in only one file. Also, my other site didn't have this problem. I wonder why... I thought I read somewhere that you could include the namespace declaration in the top include file, so I tried that in the controller file listed above, but it didn't work. But... in any case, adding that declaration did fix the issue. Thanks, again! Peter
  13. Peter Falkenberg Brown

    Dear Robin, That resolved it. Thanks! However, I'm curious: the other 3.0.61 site works fine, without that namespace declaration. Any thoughts on why that might be so? Also, all the files in my system are include files, running off a controller file. All of the field templates are defined to pull up this file: custom_template_controller.php, which then pulls up various page files, like 'home.php', 'section.php', 'article.php', etc. Those top level includes then include around a dozen or more smaller include files, like the menu, the header, etc, etc. I'm wondering why the menu file choked, but the other includes did not. Because of the Hook code? Here's the code in the top control file: <?php include("./inc_vars.php"); include("./inc_functions.php"); #.................................................................... # block future publish dates; don't block home page (id 1) if ( ( $page->id == '1' ) || ( ! empty( $publish_date ) and $publish_date <= $now ) ) { # page can be displayed } else { throw new Wire404Exception(); } #.................................................................... include("./$custom_template_file"); Thanks for your help! Peter
  14. Peter Falkenberg Brown

    Hi All, I copied a 3.0.42 site to a new domain, and then upgraded it to 3.0.61. All was well. After finishing that domain, I copied the new 3.0.61 site to a new domain, and modified all of the variables, settings, etc, as normal. When I went to the home page, I got this error: Recoverable Fatal Error: Argument 1 passed to menu_post_process() must be an instance of HookEvent, instance of ProcessWire\HookEvent given, called in /home/USER/public_html/wire/core/WireHooks.php on line 777 and defined (line 80 of /home/USER/public_html/site/templates/inc_create_menu_mobile.php) I saw that error once before, in 3.0, when I tried to put a file compiler false directive in config.php. That was solved when I placed this directive: # FileCompiler=0 in a php file in my home dir. That is, it had nothing to do with the menu code at all, but it was affecting it. That fix still exists, and none of this happened on my first 3.0.61 site that I copied *from*. That earlier issue is documented in this post: I'm wondering if it's something in 3.0.61 that got screwy because I copied the site. I deleted the cache, and sessions, to no avail. In fact, I deleted the code that even uses the above php file that has the FileCompiler directive in it. The pages load fine when I comment out the menu. The menu uses the MarkupSimpleNavigation module. The menu file has this code in it: function menu_post_process(HookEvent $event) { $page = $event->arguments[1]; $new_code = $event->return; # check for open_in_new_tab if($page->open_in_new_tab) { $new_code = str_replace('href=','target="_blank" href=', $new_code); } $event->return = $new_code; } I'm stumped. Thanks for any help! Peter
  15. Peter Falkenberg Brown

    Thanks, LostKobrakai, My form has a function in a file in the template directory that includes a captcha php file in the /home/USER directory. When I placed: # FileCompiler=0 at the top of the included php file (the one in the /home/USER directory), the error went away. The problem must have been that FileCompiler went to work on the included php file in the home directory and then tried to click through the other subdirectories in the home directory. If I had moved that file to the site/template directory, it might not have had that problem (I presume). I didn't test that because the declaration above fixed it. Thanks for your help! Peter