Jump to content

dragan

Members
  • Posts

    2,007
  • Joined

  • Last visited

  • Days Won

    21

Everything posted by dragan

  1. what is $upgradePage->maintainer; ? And are you doing session_start(); at the top of your PHP files?
  2. $session is only usable from within PW. Use PHP's native $_SESSION instead.
  3. Well, in the meantime, as a quick and dirty workaround, you could just insert an old-fashioned dialog in modules/ProcessPageListerPro/ProcessPageListerPro.js / line 29 $("#Inputfield_run_action").click(function() { var $form = $(this).parents('form'); $form.attr('target', 'actions_viewport'); // change target for this submission $viewport.slideDown(); if($viewport.is(".InputfieldStateCollapsed")) $viewport.find(".InputfieldHeader").click(); setTimeout(function() { $form.attr('target', '_top'); }, 1000); // restore target var $icon = $(this).find("i.fa"); $icon.attr('id', 'actions_spinner').attr('data-icon', $icon.attr('class')).removeClass($icon.attr('class')).addClass("fa fa-lg fa-spinner fa-spin"); if (window.confirm("Do you really want to do this?")) { } return true; });
  4. Just tried out 2-factor auth for the first time - works like a charm! (both with email and with Google Authenticator).
  5. Well, over here, when I try to open a page for editing, it never gets loaded. It just keeps on loading.... forever. PW logs show nothing, same goes for TD.
  6. Just very quickly... Not sure, but why would you want to? It's enough if you sit down and think about what kind of data you'll gonna need from PW. Then create appropriate JSON files that deliver raw data to your Vue.js app. You don't even need something like PageQueryBoss for that. Send a request from Vue to PW, do your usual $pages->find() or whatever, create an array, do json_encode(), set appropriate JSON-headers, and that's it. Frankly, haven't tried that. But you don't have to "mirror" PW users in your Vue.js app. Just send requests with credentials to PW, and return true/false and maybe add an HTTP header token for logins. For registrations, it's going to be a little more coding, but with PW's API, it shouldn't be too hard. Do you want to render/show PW's native page-edit view within that modal, or do you plan to re-create the whole page-edit functionality in Vue? I'd steer away from the latter, cause you'd be re-creating the proverbial wheel.
  7. @justb3a I want to somehow create a unique page-slug (page name) for certain pages. Do you think your module could be tweaked (maybe with a hook or otherwise), to let authors create a unique page name, in page-edit mode? This would be awesome. The reason behind it: I want to create content, where only people who have that URL have access to it, without the author having to create a login / user first. I know, this is commonly called "security by obscurity", but for our use-case that's enough.
  8. I've never done something like this, but you could perhaps use one of these two modules and see if they're hookable. http://modules.processwire.com/modules/login-notifier/ http://modules.processwire.com/modules/process-login-history/ Or you could track logins yourself and also track IP#, user agent, and maybe even geo-tracking. Perhaps create a cookie with a token too. Store them somewhere, and on every login check if that user is already logged in. If yes, deny access to the user who tries to login later, and show some message.
  9. What do you mean? You HAD error messages. And I'm sure also in your browser JS console.
  10. The blinking is one thing, but why does it also change the number of results (and hence - pages)? I've set my window to height 600px.
  11. Another oddity: I get sometimes 3-4 times the same page listed. Here, instead of showing 1060 pages, I get 2162: My setup: // example for template "project" document.addEventListener('RockGridItemBeforeInit', function(e) { if(e.target.id != 'RockGridItem_project') return; var grid = RockGrid.getGrid(e.target.id); var col = grid.getColDef('vertec'); col.headerName = 'Vertec'; var col = grid.getColDef('title'); col.headerName = "Titel"; var col = grid.getColDef('client_name'); col.headerName = "Kunde"; var col = grid.getColDef('year'); col.headerName = "Erscheinungsjahr"; var col = grid.getColDef('service'); col.headerName = "Dienstleistung"; var col = grid.getColDef('product'); col.headerName = "Worum geht's?"; var col = grid.getColDef('project_desc_short'); col.headerName = "Referenz-Beschreibung"; // set fixed column width var col = grid.getColDef('created'); col.headerName = grid.js.created; col.width = 150; col.suppressSizeToFit = true; // add coldef plugins (shortcuts for dates, numbers, etc) grid.addColDefPlugins({ created: {name: 'date', format: 'DD.MM.YYYY HH:mm:ss'}, }); }); document.addEventListener('RockGridItemAfterInit', function(e) { if(e.target.id != 'RockGridItem_transactions') return; var col; var colDef; var grid = RockGrid.getGrid(e.target.id); // hide one column grid.columnApi().setColumnVisible('myhiddencolumn', false); }); <?php namespace ProcessWire; // optional: load external asset $this->rg->assets->add($this->config->paths->siteModules . 'FieldtypeRockGrid/lib/moment.min.js'); // set data for this grid via rockfinder $this->setData(new RockFinder("template=project, parent=1041, sort=-created, include=all", [ 'title', 'client_name', 'vertec', 'year', 'service', 'product', 'project_desc_short', 'created', ])); Looking at the debug infos in getSQL: SELECT `rockfinder`.* FROM /* original pw query */ (SELECT pages.id FROM `pages` WHERE (pages.templates_id=44) AND (pages.parent_id=1041) GROUP BY pages.id ORDER BY pages.created DESC ) as `pwfinder` /* rockfinder */ LEFT JOIN ( SELECT `pages`.`id` AS `id`, `title`.`title` AS `title`, `client_name`.`client_name` AS `client_name`, `vertec`.`vertec` AS `vertec`, `year`.`year` AS `year`, `service`.`service` AS `service`, `product`.`product` AS `product`, `project_desc_short`.`project_desc_short` AS `project_desc_short`, `created`.`created` AS `created` FROM `pages` /* --- join title --- */ LEFT JOIN (SELECT `pages_id` AS `pageid`, `title`.`data` AS `title` FROM `field_title` AS `title`) AS `title` ON `title`.`pageid` = `pages`.`id` /* --- end title --- */ /* --- join client_name --- */ LEFT JOIN (SELECT `pages_id` AS `pageid`, `client_name`.`data` AS `client_name` FROM `field_client_name` AS `client_name`) AS `client_name` ON `client_name`.`pageid` = `pages`.`id` /* --- end client_name --- */ /* --- join vertec --- */ LEFT JOIN (SELECT `pages_id` AS `pageid`, `vertec`.`data` AS `vertec` FROM `field_vertec` AS `vertec`) AS `vertec` ON `vertec`.`pageid` = `pages`.`id` /* --- end vertec --- */ /* --- join year --- */ LEFT JOIN (SELECT `pages_id` AS `pageid`, `year`.`data` AS `year` FROM `field_year` AS `year`) AS `year` ON `year`.`pageid` = `pages`.`id` /* --- end year --- */ /* --- join service --- */ LEFT JOIN (SELECT `service`.`pages_id` AS `pageid`, `service`.`data` AS `service` FROM `field_service` AS `service` GROUP BY `service`.`pages_id`, `service`.`data`) AS `service` ON `service`.`pageid` = `pages`.`id` /* --- end service --- */ /* --- join product --- */ LEFT JOIN (SELECT `product`.`pages_id` AS `pageid`, `product`.`data` AS `product` FROM `field_product` AS `product` GROUP BY `product`.`pages_id`, `product`.`data`) AS `product` ON `product`.`pageid` = `pages`.`id` /* --- end product --- */ /* --- join project_desc_short --- */ LEFT JOIN (SELECT `pages_id` AS `pageid`, `project_desc_short`.`data` AS `project_desc_short` FROM `field_project_desc_short` AS `project_desc_short`) AS `project_desc_short` ON `project_desc_short`.`pageid` = `pages`.`id` /* --- end project_desc_short --- */ /* --- join created --- */ LEFT JOIN (SELECT `id` AS `pageid`, `created` FROM `pages` AS `created`) AS `created` ON `created`.`pageid` = `pages`.`id` /* --- end created --- */ ) AS `rockfinder` ON `pwfinder`.`id` = `rockfinder`.`id` /* end rockfinder */ imho, I think this is wrong: /* --- join title --- */ LEFT JOIN (SELECT `pages_id` AS `pageid`, `title`.`data` AS `title` FROM `field_title` AS `title`) AS `title` ON `title`.`pageid` = `pages`.`id` /* --- end title --- */ Well, or any other part of the whole SQL - do you assume every title is necessarily unique? The only unique thing is the page id. Did you run into a similar wrong output, or do I have to adjust my query? (selector)
  12. I set up a simple RockGrid example, but see strange things in the backend, see screen capture and JS console errors (ignore the first error). Any idea what could cause this?
  13. I've never dealt with AWS, and although I'm sure you've searched around, I found some forum threads dealing with similar issues. https://processwire.com/blog/posts/amazon-aws-now-powering-processwire.com-sites/ ^ nothing specific about image-cropping (or images in general), but maybe @ryan has built something which would help you find a solution? (don't want to pollute this thread, just thinking maybe you'll find some hints or code-snippets...)
  14. Try to find the culprit in the inspector: Is a CSS-rule overriding another one? Which CSS causes this? If you see inline-styles: a) look at the rendered source via inspector (CTRL + SHIFT + C) b) compare it to the raw HTML source-code, as it is being delivered by the server, i.e. before any JS had a chance to manipulate the DOM (before any window.load or document.ready has been applied). In Chrome, the keyboard shortcut is CTRL + U. If you don't see any inline-styles in b), it means some JS is triggered to alter the iFrame styles (or something near there). CTRL + SHIFT + J And of course, check the console for JS errors or warnings.
  15. $u = $users->find("last_name=Smith"); foreach($u as $uu) { echo "{$uu->first_name} {$uu->last_name}<br>"; } // combine: (marital_status is a page-reference field in my test setup) $u = $users->find("marital_status=divorced, last_name=Smith"); foreach($u as $uu) { echo "{$uu->first_name} {$uu->last_name}, {$uu->marital_status->title} <br>"; }
  16. I tried it out now like this: <div id="rockgriddemo"> <?php $grid = $page->rockgriddemo; ob_start(); echo $grid; ob_end_flush(); ?> </div> And everything still works normally. But I haven't used output buffering in a long long time. Not even sure I am using it correctly...
  17. I tried it without output buffering and it works normally. Where is this line 110 ob_start() exactly sitting? Do you use a prepend file? Is it in your basic_page.php template? Is <div><?php $page->rockgrid; ?></div> right after ob_start() ? XAMPP here on Windows 8 and PHP 7.1.9, PW 3.0.106
  18. $home = $pages->get('/'); foreach($home->children as $child) { $content .= "<a href='{$child->url}'>{$child->title}</a><br>"; if($child->id !== 1035) { if($child->hasChildren) { foreach($child->children as $child2) { $content .= "- <a href='{$child2->url}'>{$child2->title}</a><br>"; } } } } page id 1035 would be archive parent
  19. Where do you want to place this navigation? In root, or only in the exhibition pages?
  20. Is node_modules in the site's root directory? If yes, move it somewhere in site/templates/ and adjust the path(s) in your JS script(s). If this is really at the root level, PW's .htaccess mod_rewrite will instead search for a parent page node_modules and a child page ol and a page OSM ?
  21. I don't quite fully understand the scenario, but maybe you could use the inputfield selector. As a default selector you could point to the repeater parent (under Admin), and then go from there? Or maybe try the Connect Page Fields module; perhaps it'll simplify the cross-referencing https://modules.processwire.com/modules/connect-page-fields/
  22. Are you familiar at all with PW? I mean, do you know how templates, pages and fields work? It seems you just upload everything in a certain folder, and use .html instead of .php. Here are the basics: https://processwire.com/api/templates/
  23. To me it looks strange that you upload the node_modules folder to the server. I assume you have a dev and a build/dist task, no? Usually you create a build version and only upload the final/minified assets. But I don't know how your frontend-setup looks like...
  24. Hello @yrglx and welcome to the forum. I have never used OL myself, but PW simply doesn't care what you put in your frontend-templates. Does OL require an API key like Googlemaps? If yes, then this is usually restricted to a certain domain. Do you see any JS errors in the browser console? Are you sure your CSS + JS paths are correct?
  25. Evo me opet ? I encountered a strange problem today when I wanted to setup something with required fields: I first hit the module's save-button, then I hit the PW field-save button. And PW can't save the field, because I get errors from the first field that is required (I don't want to prepopulate the fields or use placeholders). This is some kind of a Catch-22 problem I guess ? And also, I see JS errors in Chrome console: When I want to edit a page where I have this field inside, Tracy reports this error: ErrorException: count(): Parameter must be an array or an object that implements Countable in /home/sitecom/www/mysite/site/modules/FieldtypeConfigForm/FieldtypeConfigForm.module:69 Stack trace: #0 [internal function]: Tracy\Bar->Tracy\{closure}(2, 'count(): Parame...', '/home/zeixcom/w...', 69, Array) #1 /home/sitecom/www/mysite/site/modules/FieldtypeConfigForm/FieldtypeConfigForm.module(69): count(Object(stdClass)) #2 /home/sitecom/www/mysite/wire/core/Wire.php(389): ProcessWire\FieldtypeConfigForm->___formatValue(Object(ProcessWire\Page), Object(ProcessWire\Field), Object(ProcessWire\ConfigForm)) #3 /home/sitecom/www/mysite/wire/core/WireHooks.php(723): ProcessWire\Wire->_callMethod('___formatValue', Array) #4 /home/sitecom/www/mysite/wire/core/Wire.php(413): ProcessWire\WireHooks->runHooks(Object(ProcessWire\FieldtypeConfigForm), 'formatValue', Array) #5 /home/sitecom/www/mysite/wire/core/Page.php(1436): ProcessWire\Wire->_callHookMethod('formatValue', Array) #6 /home/sitecom/www/mysite/wire/core/Page.php(1364): ProcessWire\Page->formatFieldValue(Object(ProcessWire\Field), Object(ProcessWire\ConfigForm)) #7 /home/sitecom/www/mysite/wire/core/Page.php(1116): ProcessWire\Page->getFieldValue('setup') #8 /home/sitecom/www/mysite/wire/core/Page.php(1600): ProcessWire\Page->get('setup') #9 /home/sitecom/www/mysite/site/assets/cache/FileCompiler/site/modules/TracyDebugger/panels/RequestInfoPanel.php(470): ProcessWire\Page->getFormatted('setup') #10 /home/sitecom/www/mysite/site/assets/cache/FileCompiler/site/modules/TracyDebugger/tracy-master/src/Tracy/Bar.php(159): RequestInfoPanel->getPanel() #11 /home/sitecom/www/mysite/site/assets/cache/FileCompiler/site/modules/TracyDebugger/tracy-master/src/Tracy/Bar.php(108): Tracy\Bar->renderPanels() #12 /home/sitecom/www/mysite/site/assets/cache/FileCompiler/site/modules/TracyDebugger/TracyDebugger.module(1487): Tracy\Bar->render() #13 /home/sitecom/www/mysite/wire/core/Wire.php(383): TracyDebugger->sessionHandlerDBAjaxFix(Object(ProcessWire\HookEvent)) #14 /home/sitecom/www/mysite/wire/core/WireHooks.php(825): ProcessWire\Wire->_callMethod('sessionHandlerD...', Array) #15 /home/sitecom/www/mysite/wire/core/Wire.php(442): ProcessWire\WireHooks->runHooks(Object(ProcessWire\ProcessWire), 'finished', Array) #16 /home/sitecom/www/mysite/wire/core/ProcessWire.php(603): ProcessWire\Wire->__call('finished', Array) #17 /home/sitecom/www/mysite/wire/core/ProcessWire.php(499): ProcessWire\ProcessWire->__call('finished', Array) #18 /home/sitecom/www/mysite/wire/modules/Process/ProcessPageView.module(254): ProcessWire\ProcessWire->setStatus(16) #19 /home/sitecom/www/mysite/wire/core/Wire.php(380): ProcessWire\ProcessPageView->___finished() #20 /home/sitecom/www/mysite/wire/core/WireHooks.php(723): ProcessWire\Wire->_callMethod('___finished', Array) #21 /home/sitecom/www/mysite/wire/core/Wire.php(442): ProcessWire\WireHooks->runHooks(Object(ProcessWire\ProcessPageView), 'finished', Array) #22 /home/sitecom/www/mysite/index.php(56): ProcessWire\Wire->__call('finished', Array) #23 {main} Any ideas? Did you ever stumble across such a situation?
×
×
  • Create New...