Jump to content

Robin S

Members
  • Posts

    4,928
  • Joined

  • Days Won

    321

Everything posted by Robin S

  1. v0.0.5 released. Allows use of the dropdown/dialog in CKEditor fields that do not have the Hanna Code textformatter applied to them, in order to support $hanna->render() usage.
  2. Thanks for the report. Are you running PHP 7.1? I think that's the version that started enforcing stricter numeric values and throwing errors like this. I tested in PHP7.1 and I can't reproduce this issue. Also, I can't see how this error could be connected to HannaCodeDialog. From what I've read the "non well formed numeric value" error occurs when some arithmetic or other operation that expects an integer receives a string instead. And line 118 of Database.php is: $timerTotalSinceStart = Debug::timer() - $timerFirstStartTime; So probably Debug::timer() or $timerFirstStartTime is not an integer, but this is core code that relates to the debug mode tools and HannaCodeDialog has nothing to do with that. Do you see the error as soon as you install HannaCodeDialog? Do you see it if you have no Hanna codes defined when the module is installed (I'm wondering if the problem is with one of your Hanna codes rather than the module itself)? If you uninstall HannaCodeDialog does the error go away? I will support this in the next version. The intention was to avoid needlessly attaching the plugins to every instance of CKEditor if the textformatter wasn't applied to that field, but I guess to support $hanna->render() there's no way to know if a CKEditor field needs the plugins or not. I'm having trouble understanding exactly what's going wrong for you here. Make sure you meet the prerequisites and have completed the installation process: TextformatterHannaCode must be installed. TextformatterHannaCode must be applied as a textformatter to your CKEditor field. You must have at least one Hanna code created. Install HannaCodeDialog module. Edit the settings for your CKEditor field and in "Input > CKEditor Settings > CKEditor Toolbar" add "HannaDropdown" (to be precise, with a comma space separating it from the other items there)
  3. @tpr, is it possible to have the ListerTweaks submodule activated (to get the benefits of the "Lister options" section) without the submodule interfering with the columns of the Find and Users lister? Even after emptying the "Users lister columns" it shows "DEFAULTS" and prevents columns being added within the columns tab of the Users lister itself. Could there be checkboxes to turn off the column options within AOS?
  4. Do you mean a repeater field that you tried to import, or one that you are creating afresh via Setup > Fields > Add New? When you create a repeater field it should create a (system) template for itself automatically so weird that you are getting that error. If you don't already have a lot of repeaters created I would try deleting all repeater fields, uninstalling FieldtypeRepeater, then reinstall FieldtypeRepeater and start over with your repeater fields.
  5. Not sure but perhaps because you are not checking the process property of $this->page, i.e. instead of this... || $this->wire("process") == 'ProcessLogin' ...try... || $this->page->process == 'ProcessLogin'
  6. There is limited (and undocumented) AJAX 'dependent selects' support built into Page Reference fields. You must use the 'Custom find' or 'Selector string' option for defining selectable pages, and reference the source Page Reference field (that exists on the same page) using syntax like this: parent=page.page_reference_field_name Based on testing I have found: It only works for Select, Select Multiple or AsmSelect inputfields It does not work inside a repeater item
  7. Nice! Several features would be covered already by ListerPro but I take it this will be a free module so that's cool. I like the drag box for selection and the stepping through selected pages in the modal - ListerPro doesn't offer those features. Looking forward to trying it out!
  8. Hi and welcome @ren! I recommend you install the Tracy Debugger module as you'll find this an essential tool when developing. Then you can dump the $page object above your if() conditional and explore what its properties are (parent, url, etc). It should be obvious then why $page will or will not match those conditions you have set. // do not redirect if page matches: bd($this->page, 'page'); if($this->page->template != "admin" // any non-admin page || $this->page->is($this->redirectPage) // the dashboard page (prevent infinite loop) || $this->page->parent->is('/admin/login/') // various attempts to allow logging out || $this->wire("process") == 'ProcessLogin' || strpos($this->page->url, $this->wire('config')->urls->admin . 'login/logout') !== false ) { return; }
  9. When looping over the pages in a Page field, set some property to the Page object to serve as an indicator that the page has been processed. Then put your code that processes the pages inside an if() condition that checks that the property has not already been set. So something like: if(!$page->processed) { // do your processing here // ... $page->processed = true; }
  10. I did a bit of testing today with $config->sessionCookieDomain and I couldn't get it to log me in across subdomains. Also, if I logged in on one subdomain and then tried to log in on the other subdomain I was sent in a endless redirection loop.
  11. Hi @tpr, could you please add a "word-wrap: break-word" rule for the filename link when the 'no-truncate' option is on for File fields? See the screenshot below where filenames with underscore word separators do not wrap. Thanks.
  12. This config setting sounds like it should do what you're aiming for... $config->sessionCookieDomain null or string Domain to use for sessions, which enables a session to work across subdomains, or NULL to disable (default/recommended). ...but I see you have already tried that. Maybe try without the leading dot? If that setting still doesn't work I suggest opening a GitHub issue so Ryan can confirm if it's a bug or not. Sorry to hear this is proving so difficult to get working. If you want to investigate some more yourself you could install the essential Tracy Debugger and start dumping stuff inside /wire/core/Session.php to try and find out where the issue is occurring.
  13. I think most people do, but you don't have to. You can do this using includes. For instance, you could have a template file "master.php", and set this file as the "Alternate template filename" for all your templates. Then in the master file you use some logic to include the file that contains the code for each template. For instance, you could create some subfolders to divide up these included files and then tag templates (on the Advanced tab of Edit Template) with a single tag according to which subfolder their file is in. Your logic in master.php then could be something like this: $path = $page->template->name . '.php'; if($page->template->tags) $path = $page->template->tags . '/' . $path; include($path);
  14. @PWaddict, if you want to hide just the Tree menu I made a module for that: AdminOnSteroids adds some classes to the body element that can help with this: https://github.com/rolandtoth/AdminOnSteroids/wiki#extra-classes-added-to-body-tag So you can prefix your CSS rule with body.role-nonsuperuser
  15. Note: this functionality is now built into AdminOnSteroids. I wanted to hide the Tree dropdown menu for some roles, so I made this simple module. https://github.com/Toutouwai/RestrictTreeDropdown RestrictTreeDropdown Allows the Tree dropdown menu to be hidden for selected roles. Usage Install the RestrictTreeDropdown module. In the module config select one or more roles to hide the Tree dropdown menu from.
  16. Regarding the Page Tree bookmarks, I found this comment in ProcessPageList.module: // support bookmarks only if already in use as bookmarks for ProcessPageList to be phased out Plus several other comments in the file to the same effect. Maybe this was announced and I missed it.
  17. I might be wrong but I don't think export/import of repeater items is fully supported (seems like repeaters should be excluded from the list of fields available for export to avoid confusion). Just like you can't duplicate a repeater field like you can with most other fields. If you check the export data for a repeater field you can see it is missing a lot of important information like subfields, and things like 'template_id' and 'parent_id' aren't going to be correct on the site you import to. { "test_repeater": { "id": 145, "type": "FieldtypeRepeater", "flags": 0, "name": "test_repeater", "label": "Test repeater", "template_id": 55, "parent_id": 1079, "repeaterFields": "", "repeaterCollapse": 0, "repeaterLoading": 1, "collapsed": 0, "repeaterTitle": "#n: {title}", "repeaterAddLabel": "", "rememberOpen": "", "showIf": "", "columnWidth": 100, "required": "", "requiredIf": "" } }
  18. Could you please describe where the problem was and how you resolved it, in case people have similar problems in the future? Thanks.
  19. Not sure I can be much help, but can you describe the setup in some more detail? These subdomains: does each subdomain have an independent installation of PW? Or a multi-site setup? In which case what 'flavour' of multi-site? (e.g. one of the kinds described in the docs, PW3 multi-instance, or Soma's module) And the objective is to have a kind of single sign-in that works across the sites/subdomains? Or do you just have a single-site PW installation that you can access from more than one subdomain?
  20. This sounds to me like it's a permissions/access issue - so not so much about which browser but about the fact that you were probably logged in as superuser when you were first viewing the website, but you're a 'guest' when viewing in those other circumstances. Have you done anything out-of-the-ordinary around access, e.g. removed guest view permission for a template or a field? It looks like you have a single page frontend where you pull sections of content from child pages. Did you maybe do something to try and prevent direct access to those child pages? Just trying to work out why guest access would be limited somehow.
  21. Welcome @shivrajsa, The simplest way would be for the template files in each /site/templates/ directory to consist only of include() statements, which draw from a central templates directory at /templates/. Ryan suggests something like this here: Or, as also mentioned in that thread, you could consider using symlinks.
  22. Thanks @abdus, that works for the Page Edit bookmarks. But the Page Tree bookmarks are still MIA, maybe because the "Tree" menu item has recently been repurposed for the tree dropdown menus?
  23. Back when PW 2.6.17 was released the blog post that week described several types of bookmarks: https://processwire.com/blog/posts/processwire-2.6.17-expands-admin-navigation-with-bookmarks/ In recent versions of PW3 I can't find where Page Tree bookmarks and Page Edit bookmarks may be defined or accessed. Have these two bookmark features been removed?
  24. That syntax is not quite right. The format is this: elements [attributes]{styles}(classes) So your rule would be: a[href,rel](*) Don't think you need to include the href attribute though as that is allowed by default.
  25. @BillH, PW now takes care of link abstraction inside CKEditor fields if the "Link abstraction" setting is checked for the field (which it is by default). There is also the Page Path History module which will take care of redirects when a page path changes (this works for all pages, not just links inside a CKEditor field).
×
×
  • Create New...