Jump to content

rick

Members
  • Posts

    651
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by rick

  1. Bingo! We have a winner! Everyone can go home now, @Robin S done won the prize. ? I cannot tell you how long that would have taken me to figure out. I'll give you a hint: I'm old and don't have that much time. Thank you and thank you to everyone that helped. This forum community makes a defining difference between other CMSs.
  2. Yes, I tried that, along with many other permutations. Now, I'm in the middle of starting over again with a fresh install.
  3. My process module is using the ProcessHello files: This is the MyProcess.module.php without all the comments: class MyProcess extends Process { public function init() { $this->config->styles->append ... datatables.css; $this->config->scripts->append ... datatables.js; parent::init(); } // Main menu end point. public function execute() { // Display placehoder content from main menu } // Sub menu end point. // This is the method executed regardless of ajax url setting - see myprocess.js public function executeOption1() { $mytable = <<<_OPT ... _OPT; // myTableID return $mytable; // This is the data shown as the ajax response. } // Ajax end point. // This is the method that should be executed. public function executeOption1List() { // extract data from pages $result[] = [ col1, col2, ...] echo json_encode( $result ); } } MyProcess.info.php $info = array( // title, etc. // page that you want created to execute this module 'page' => array( 'name' => 'myprocess', 'parent' => 'admin', 'title' => 'My Process' ), // optional extra navigation that appears in admin 'nav' => array( array( 'url' => 'option1/', // number only for clarity 'label' => 'Option1', ), array( 'url' => 'option2/', 'label' => 'Option2', ), ) // for more options that you may specify here, see the file: /wire/core/Process.php ); MyProcess.config.php is the example provided in ProcessHello. I'm not using it at the moment. The MyProcess.js: $(document).ready(function() { $('#myTableID').DataTable( { dom: '<lf<t>ip>', processing: true, ajax: { url: './option1-list/', // I've tried with/without trailing slash, with/without './', etc. dataSrc: '' }, columns: [ { blah blah }, ], }); }); Like I said, there is something simple that I am missing, but I can't seem to find it. This works in the stand-alone modules, but does not work in the ProcessHello mode.
  4. Hi bernhard, This is a fresh PW (98) install with only Tracy, Upgrades, and Export Profile modules installed.
  5. Thanks Robin, but now the complete URL is shown in the network tab, where as only the url specified in the ajax url is shown when omitting the trailing slash. The response data is still the data generated by the execute() function. Originally, I had manually built the menu structure under Admin, and assigned separate process modules to each. The ajax requests worked. Now I am trying to refactor this to removed duplicate code, installing half a dozen process modules, etc. Using the ProcessHello structure, those "physical paths" that ajax was previously using no longer exist. Does this mean that I have to write my own routing procedure in the execute() method?
  6. Howdy all, I am having difficulty getting an AJAX URL to target the appropriate executeSomething method. No matter how I define the URL only the execute() method is called. I am creating a process module based on ProcessHello. I have sub-menu options defined which have their own paths as stated in the module.info.php file. However, an example ajax url defined as "./some-thing" does not access the executeSomeThing method. It only hits the execute() method. I have tried an ajax url as "./sub-menu option path/some-thing" and still no joy. Obviously I am missing something very simple. Can anyone shed some light on this please?
  7. Also, don't set the new page id to the current page id.
  8. There was no data associated with x-tracy-header that I could see (just an empty entry), and it is no longer present since disabling the system notifications.
  9. I hadn't noticed. I don't use that theme because of the poor ui, but that is a different story. I disabled the system notification and this issue no longer exists. So this wasn't related to tracy at all, but thanks for your help.
  10. Absolutely! I'll take a look in in a bit when I get back. I'll also get rid of that notifications module. The only reason I enabled it was I didn't like all the default messages scrolling the content off the screen. I figured notifications would be less intrusive/aggravating/cumbersome?
  11. I'm not sure if this is tracy related or not. How do you disable the notification requests? url ?Notifications=update&time=1524147545 The header shows x-tracy-ajax. This fills and scrolls the console/network pane making it difficult to refer back.
  12. How did you know I was needing this functionality just today. Great stuff! Thanks!
  13. Thanks @Robin S and @Jonathan Lahijani. I was thinking about page references, but posted the hierarchy as a simple way to show the relationship. So Robin, I agree completely, and prefer the future-proof methods as well. Jonathan listed out the organization that clears some of the brain fog. Haha. And yes, contractors are actual people. Thank you both for your insight!
  14. Howdy all, I'm tryin' to wrap my head around the best way to organize a site and hope y'all can offer some clarification. I have a large number of contractors, approximately 4000. I have a large number of contractor companies, approximately 10-20. Each contractor company has a variable number of current job sites working. Each contractor company has a variable number of specialities, such as electrical, plumbing, etc. Not all apply to each company. I need some means to assign a contractor to one or more contractor companies, and to one or more job sites, and to one or more specialities. An organizational option I have thought about is as follows: Contractors -- Contractor Companies -- -- Job Sites -- -- -- Specialities So I need to dynamically create each of these pages, ie, add a new job site and assign specialities to a company, then assign one or more contractors. I am thinking of process modules to handle this procedure, then create the module interface to display results on the front end. I hope that I have explained this well as I've managed to maneuver my brain into a fog.
  15. Hi @adrian, I haven't had a bad run with Tracy at all. On the contrary, I nominate Tracy for module of the year. And you have done an excellent job of maintaining this indispensable tool. I've made the changes to the rss module. I don't see anything crop up yet. Thanks for those. Upgraded to Tracy.26 on both local installs and all is functioning well. I appreciate your time and help!
  16. Hi @adrian, I just installed the MarkupLoadRSS module and all kinds of stuff started happening with Tracy. First, I noticed that I can't place the mouse in the snippet name field. As soon as you click in the text box the cursor is immediately placed back in the console window. This is fresh PW.94 localhost install and Tracy.25 is the only other module installed. Second, I now get the following: Exception: Objects returned by MarkupLoadRSS::getIterator() must be traversable or implement interface Iterator in /var/www/tgp/site/assets/cache/FileCompiler/site/modules/TracyDebugger/panels/RequestInfoPanel.php:181 Stack trace: #0 /var/www/tgp/site/assets/cache/FileCompiler/site/modules/TracyDebugger/tracy-master/src/Tracy/Bar.php(159): RequestInfoPanel->getPanel() ... Lastly, I cannot scroll the results pane horizontally. There is no scroll bar. I have uninstalled the rss module, shutdown pw, and restarted... the behavior is consistent. So I am not sure whether this was present before I installed the rss module. I am not sure if this is related, but on another localhost development site (never had rss module installed), I upgraded Tracy from .23 to .25 and got this error: Failed to init module: TracyDebugger - Tracy\Debugger::dispatch() called after some output has been sent. Output started at /.../wire/core/FileCompiler.php:980 And the behavior is identical as seen with the other localhost site. Edit: Additional Info... I am not able to select any text from within the results pane. It behaves as if some selection is already in progress. When attempting to make a selection, either by mouse or keyboard, the selection starts at the very beginning of the results pane content and selects wherever the mouse or keyboard control was initiated. I have seen something like this before quite a while back. If I remember correctly it was a JS issue. I do not remember how it was resolved.
  17. 304 of xxx,xxx
  18. Howdy @ksymmons, This is an interesting topic, and one not easily answered as there are many individual preferences. But my generalized workflow has been: Initial client contact. Needs Analysis - I have only stood face to face with a client and their support team (marketing, documentation, training, IT, SMEs, etc.) and never used email to discuss functionality, unless it is a simple question. Functional Requirements Specification - Which also includes the timeline (milestones), payment options, and my NDA. They return a signed copy along with a check, or they throw the thing away. Upon the check clearing, I begin the project. I submit for review (in person if required) at each milestone, and collect another check upon sign-off. Rinse and repeat. The product is delivered upon clearance of final payment. Now, as with most any project, there will always be feature creep that was not disclosed during the NA phase. I present an addendum to the original spec that outlines the requirements, timeline, and costs of this new mini-project. Like I said, it's mostly personal preferences. However, there are certain expectations when dealing with large clients. Face to face meetings, for example. I don't know of any company that will hand over a large check without first meeting you. The Needs Analysis phase can last from a couple of hours to a number of days, and even involve travel to other locations. The client pays for my expenses, and I spend as much time with them as necessary for us both to be satisfied. Nothing is worse than having to go back to the client and ask a question that should have been covered initially. Hope all this helps. Regarding your long questionnaire question, I never expect a client (however small) to spend time completing an online form unless that online form is part of the project.
  19. Hi @Monty, and welcome to the forum! With the blank profile, you are left to build everything you may need for your site. However, you can use the code from other profiles, such as from the site-default/templates/_main.php file to generate your menu navigation, like so: //place this code in your template where you want the menu displayed. <ul class='topnav' role='navigation'><?php // top navigation consists of homepage and its visible children foreach($homepage->and($homepage->children) as $item) { if($item->id == $page->rootParent->id) { echo "<li class='current' aria-current='true'><span class='visually-hidden'>Current page: </span>"; } else { echo "<li>"; } echo "<a href='$item->url'>$item->title</a></li>"; } ?></ul> Another option could be to use the _func.php file located in the site-default/templates folder of the processwire zip file you downloaded. This file contains a similar function to generate a navigation menu which you can call from a template. It all depends on which method (eg, Delayed Output) you are using to create your site and the structure of your pages, so this is only a general information. Is this the planets tutorial? Feel free to post your structure and someone will be able to give you more specific suggestions.
  20. It appears that it is built on PW and bootstrap. [edit] Sorry. The site itself is PW. Not sure about their app software. Although I am working on a similar type application (workflow specific) entirely within PW, I don't see any reason they would use something different.
  21. If the url (with manual query params) works when pasted into the address bar, but the exact same url (with query params) does not work when invoked through code, then I would next compare the headers. Also, have you tried url encoding/building the query string? I noticed the following in your example code: "/events?&token=" ^
  22. It was a guess, since the error points to a whole number but works when you manually enter the data. So the echo'd $result is identical to your manual entry? This is in the test environment only, correct?
  23. Maybe use double-quotes around $pageSize ?
  24. I think there should be an annual award for best module.
×
×
  • Create New...