-
Posts
5,039 -
Joined
-
Days Won
340
Everything posted by Robin S
-
That's a bug, sorry. I missed something in the JS in a recent update. Should be fixed now in v0.0.7. Yes, the module should work for existing Hanna codes. I can't reproduce that issue here. If the v0.0.7 update doesn't fix things for you could you give me some more info: any JS console errors, the PW version, TextformatterHannaCode version, and an export of a Hanna code that you see the issue with? Edit: also please let me know how the Hanna tag looks in your CKEditor field - i.e. are the attribute values inside quotes, single or double?
-
@alan, besides BatchChildEditor another handy module for this purpose is ImportPagesCSV. You select a template and parent, then in "Paste in CSV data" you just paste in a list of page titles and put 'title' on the first row (to indicate it is a list of titles).
-
I think there is some confusion because the word 'tree' has in the past sometimes been used to refer to the page list (ProcessPageList) but now labels the dropdown 'Tree' menus. To be clear, the intention behind my module is not about preventing roles from accessing the page list, it's about removing the dropdown menus which I consider to be a confusing UI for roles with limited editing access. There is a related GitHub issue open here: https://github.com/processwire/processwire-issues/issues/231
-
Well it wasn't something I tested for specifically, but it was pretty easy to add support for ProFields Textareas so I have done that in v0.0.6.
-
Sub-links and Images is not functioning in proper way
Robin S replied to Ibrahim El Haddad's topic in General Support
@Ibrahim El Haddad, maybe you have a rule in .htaccess that redirects to the www subdomain? Either the one in the default PW .htaccess... # ----------------------------------------------------------------------------------------------- # 13. OPTIONAL: Redirect users to the 'www.' version of the site (uncomment to enable). # For example: http://processwire.com/ would be redirected to http://www.processwire.com/ # ----------------------------------------------------------------------------------------------- # RewriteCond %{HTTP_HOST} !^www\. [NC] # RewriteRule ^ http://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301] ...or some custom rule. -
If you force the session variable to 1 whenever the templates list is viewed then it makes the "Show systems templates?" filter toggle non-functional. But I suppose you could take the view that if that AOS option is selected then you never want to hide the system templates, even temporarily.
-
Processwire does not remember session after closing browser
Robin S replied to Vikestart's topic in General Support
Yes, PW uses a session cookie, and that's how session cookies work: https://en.wikipedia.org/wiki/HTTP_cookie#Session_cookie You can use the LoginPersist module to stay logged in across browser sessions.- 1 reply
-
- 1
-
-
I also dislike editing code outside of my IDE. The workaround currently is pretty simple - just set this for all your PHP Hanna codes: include($config->paths->templates . 'hannas/' . $hanna->name . '.php'); But I'm in favour of anything that would make it even easier.
-
Not sure I understand fully, but wouldn't that be reinventing the wheel? Hanna Code already does a great job of allowing the result of any custom code/function to be inserted into a textarea. Do you mean so you could have certain tags that are available only on certain pages? Because that is what the getDropdownTags() hook allows for:
-
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.
-
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)
-
@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?
-
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.
-
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'
-
How to AJAX refresh field on change of another in editor?
Robin S replied to hellomoto's topic in General Support
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 -
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!
- 3 replies
-
- module
- administration
-
(and 1 more)
Tagged with:
-
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; }
-
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; }
-
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.
-
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.
-
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.
-
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);
- 2 replies
-
- 2
-
-
- structure
- organization
-
(and 1 more)
Tagged with:
-
@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
-
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.
-
Where have page tree bookmarks and page edit bookmarks gone?
Robin S replied to Robin S's topic in General Support
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.