-
Posts
10,912 -
Joined
-
Last visited
-
Days Won
349
Everything posted by adrian
-
Am I seeing things, or are you actually running the TinyMCE module instead of the default CKEditor? What version of PW?
-
No, you shouldn't leave it deactivated - it is designed to reduce dictionary login attacks. I have just messaged Ryan to see if I can find out more about the behavior of the module also recording successful logins. If that can't be changed, then you may need to set up your own access control if you want to give all users just one login account. Stay tuned - I don't want to send you down the path of setting up something else until I hear from Ryan about the behavior of this module.
-
Actually now that I think about it - I actually wonder if there is a bug in the throttle module because I thought it should only record failed login attempts, not successful ones - just investigating now. I can trigger the ban by successfully logging in out quickly several times.
-
If everyone has the same login username, then absolutely - that is what the session login throttle is designed to do. I think your quickest solution will be to disable the SessionLoginThrottle module. Just wanted to get that option to you quickly - I'll post some better solutions in a minute.
-
Ok, well let me know when you can test again later. I am guessing the error was appropriate at the time, and not related to this module. Don't worry about the session_login_throttle database table at this stage.
-
Silly question, but are you using the same username on frontend and admin logins? What happens if you wait 35 seconds - can you then login successfully? Any sign of weirdness in your session_login_throttle database table? Perhaps you could empty that table?
-
Does this error happen repeatably on the frontend, but not via the normal admin login?
-
Module: Testrun selectors + find() from admin (ProcessSelectorTest)
adrian replied to nik's topic in Modules/Plugins
Nice work Steve! Sounds like a perfect use case for the log viewer in Tracy -
General Question on how to use InputFieldSelect - newbie question
adrian replied to swissdoode's topic in General Support
I definitely try to use the Options fieldtype when I can - I just try to think through fully what flexibility I might be giving up. Unless I am missing something, I don't think there is a way for site editors to add new items to an Options field, so wouldn't that be one of the biggest difference right there? One of the other key reasons I used Pages for years in that one project was because I wanted the year pages to drive the rows in @kongondo's excellent Matrix fieldtype. Although since he introduced the custom php code option, it might actually be possible to do that with an Options fieldtype now -
General Question on how to use InputFieldSelect - newbie question
adrian replied to swissdoode's topic in General Support
It really does depends on your needs. @teppo has a valid point about using the Options field, but I have actually used pages for storing years because of all the other possibilities of using a page field provides (too many to go into here). Not saying I wouldn't use the Options field for years in a different project, but just saying you should read up and plan ahead before deciding. Remember that pages are just database rows, so 100 rows is not a big deal. Also, if you are worried about creating those pages, check out: or -
You might be looking for getForPage(), but you might be better off with subselectors: https://processwire.com/api/selectors/#sub-selectors There are some examples in there about finding main pages based on the content of repeater fields on those pages.
- 1 reply
-
- 4
-
You can definitely use include() inside a Hanna Code snippet. Have you tried an absolute path to that portfolio.php file?
-
Thanks @Robin S - really appreciate you testing all those options. It sounds like you are suggesting the last option is likely the best, which sounds good to me. Before I commit that change, could you please check that editor paths work everywhere in Tracy on Windows. Key places to check are: errors panel "bluescreen" fatal errors links to file/line from dumps panel entries log panels (does clicking on the message take you to that line in the log file) template resources - page number links from variables, functions, other files etc ToDo panel PW Info panel - edit the template file icon The reason to check all these is that many of them are not built by the Tracy core editorMapping option. Thanks again! PS - I am not suggesting that change of yours would break them if these other links were working already - I just want to make sure that there aren't any other situations we need to cover for Windows.
-
Do you mean the "Parent to restrict Role Name and Custom PHP code matches to." setting? That setting is completely optional, but the key thing is that obviously it must be above all the branches to be restricted. If your branches to be restricted are direct children of Home, then there isn't much point in this setting. It really only comes into play if they are several levels down as it reduces the page selector to that tree. You can see how it works here: https://github.com/adrianbj/AdminRestrictBranch/blob/15c70b90144fa68cafed0cdbb2d802e5dcfa1f2c/AdminRestrictBranch.module#L236 - see how $branchesParentSelector is defined using the "has_parent" selector. Anyway, that setting isn't relevant to you and it sounds like you have everything working correctly?
-
I just tested that exact name for the name of the parent page and also the role name and it is working fine here, so it should work for you from what I can tell. Perhaps a multilanguage issue - is the name of the page in all languages set to nord.pw.local ?
-
Please let me know what you find out. Are you talking about the "Role Name" matching option? I think some people haven't understood this option properly. It's what I use all the time for my sites, but to be clear, in your case you'd want the name of the role to be "page-nord" to match the name of the page that is the parent of the branch you are restricting them to. Does that help, or is that what you are already doing? Or maybe you found a bug?
-
Nice, although I assume that second screenshot is with superuser logged in since it shows all branches? PS - don't forget what I mentioned earlier on about just applying access permissions to the home template and no others - if you are using this module it simplifies things a lot.
-
Sounds like something isn't quite right - if I click the page tree icon, they still get the same restricted branch. Are you talking about the icon to the left of "Pages"? When I click that, I still get the restricted branch in the panel, like so: Is this what you are talking about, or something else?
-
@Guy Verville - I would really like to know if Admin Restrict Branch works in multisite mode. I expect it should work just fine. I use it in what sounds like a very similar situation to yours - I have the same set of pages and templates for regional/project specific branches of the page tree. With that module I simply give everyone access to everything on the home template and let inheritance provide access to all templates below and the module takes care of keeping users completely restricted to their regional branch - they can't even see the other branches (or any other pages outside their specific branch). If you find any problems in multisite mode please let me know and I'll see what I can do about supporting it.
-
No problem @Robin S - the catch with your: $compilerCachePath = str_replace('/', '\\', $compilerCachePath); fix is that it breaks the paths for us Mac/Linux folks. I feel like this shouldn't be that hard to sort out, but not being able to test doesn't help.I wonder if: $compilerCachePath = realpath($compilerCachePath); or something along those lines might work?
-
How can I specify default value for certain input field?
adrian replied to PawelGIX's topic in General Support
Hi @ethfun - welcome to PW! We do have default values now for certain fields. I don't recall all of them, but definitely for Integer, which should work if you are looking for a span value like in Joss' post. Of course if you need another fieldtype, you can always just do this in your template code: $value = $page->fieldname ?: 4 -
I haven't tried, but maybe changing the Open and Close tag settings in the Hanna code config might help you get around it: Admin > Modules > Hanna Code Text Formatter