-
Posts
5,008 -
Joined
-
Days Won
333
Everything posted by Robin S
-
How to copy template fields to a new template and keep it updated?
Robin S replied to LAPS's topic in General Support
Instead of doing this, try the following instead: 1. In /site/config.php set $config->advanced = true; 2. Create your user_copy template (whatever you want to call it) 3. On the "Basics" tab of Edit Template, select "user" for "Fieldgroup" and save. 4. Remove the line you added in step 1. Now the user_copy template will always have the same fields as the user template. -
Done. Not sure, but I wonder if it's related to the PHP notices from Adminer & plugins I mentioned earlier in our PM conversation. Maybe with debug mode on the error reporting level changes and those notices are being output somewhere before session start.
-
Wonderful write-up, and a very elegant and precise website. Thanks and congratulations! Very much OT, but I was interested to see that one of your clients is the Osho UTA Institute. I saw a fascinating Netflix doco recently about the history of the Osho (aka Bhagwan Shree Rajneesh) movement in the USA: https://en.wikipedia.org/wiki/Wild_Wild_Country
-
I think I might have found the source of this issue. It seems to relate to debug mode in /site/config.php. When debug mode is on I get the session warning and when it is off I don't. Can you confirm @kongondo? @adrian, this fix isn't working reliably for me. If I visit the "MySQL" root item in the breadcrumbs, then browse into a database table, then click the database name in the breadcrumbs I get a 404. I wonder if the simplest thing might be to reverse your previous fix and make a small modification to adminer-4.6.3-mysql.php: on line 531 change "&db=" to "?db=". Seems to work well here for both the Process module and the panel. BTW, the adminer-4.6.3-mysql.php file is pretty horrible. I get why the project owner wants to compile everything into one file but it results in some weird encoding (PhpStorm gives encoding warnings when the file is opened and is liable to auto-save the file and mess it up in the process) and it's very difficult to debug. Do you think it would be feasible at all to do a custom compilation of the source to make it a bit more readable and leave out the lzw compression?
-
You can set variables to $config for this purpose, e.g.
-
No worries. Big thanks for adding Adminer to Tracy and enjoy your time away.
-
Personally I'd rather open Adminer in a new tab and have the whole screen dedicated to it. Is there a way you could make it configurable whether to have the PW menu or not? Or perhaps there could just be a small link back to the PW admin root?
-
I think it would be good to add this - I'd use it. Either option would be okay, but my preference would be to see Adminer in the Setup menu.
-
After testing on a few more local sites I can't reproduce the error, so must be something specific to that one site and nothing to bother with. But one new issue I noticed is that it seems Adminer expects its root url to always include a query string. So in the Tracy implementation it can form invalid URLs that lead to a 404. For example, the link back to the database view:
-
Am going to ditch phpMyAdmin in favour of Adminer. It's a great tool, especially when used in the Adminer Custom theme/plugin bundle: https://github.com/pematon/adminer-custom The JSON preview plugin rules: No problems with refeshing row edit views in Adminer. Was working on my own PW integration but I think @adrian might have something exciting for us all soon... ?
-
@Pete, seeing as you doing some experimenting with the forum at the moment could you please see if you can adjust the tab size CSS as per the request above?
-
PageListSelect is different because it doesn't get pages via Pages::find, but rather gets the children of individual pages if they are listable. This is what I came up with: $wire->addHookAfter('Page::listable', function(HookEvent $event) { $page = $event->object; // Page is listable if it is the Users parent or a user page and the current user has a given role if(($page->id === 29 || $page->template == 'user') && $this->wire()->user->hasRole('editor')) { $event->return = true; } }); $wire->addHookBefore('ProcessPageList::find', function(HookEvent $event) { $selector = $event->arguments(0); $page = $event->arguments(1); // Don't check access if getting children of the Users parent and the current user has a given role if($page->id === 29 && $this->wire()->user->hasRole('editor')) { $event->arguments(0, $selector . ', check_access=0'); } });
-
This is a good outline of the process: https://processwire.com/docs/tutorials/installation-moving-and-troubleshooting/page5 A quote from the article:
-
You can pass an array of variables as an $options argument to $page->render(). // Render page echo $some_page->render(['animal' => 'cat', 'colour' => 'marmalade']); // In the template file of the rendered page echo "I have a {$options['colour']} {$options['animal']}."; See Ryan's post here for more info on $page->render():
-
See this note: Because of this requirement this input type won't be suitable for non-superusers to select users because you don't have the possibility to specify check_access=0.
-
You can also name your files ModuleName.module.php if you like.
-
v0.1.11 released. Thanks to a pull request from @adrian, this update wraps the last breadcrumb item in a link to the page tree (like the other breadcrumb items) and also standardises the page tree links so they always include an "open" parameter to load the tree opened to the clicked page. This is a change from the core breadcrumbs, which treats the link on parent breadcrumb item differently. There is discussion on this topic here: https://github.com/processwire/processwire-issues/issues/22 My opinion is that the breadcrumb tree links should be treated consistently, and if you want to go back to the page tree in its last state you can click the ProcessWire logo or "Pages" or "Pages > Tree" in the main admin menus.
- 79 replies
-
- 3
-
-
- breadcrumbs
- admin
-
(and 2 more)
Tagged with:
-
It sure does - I've built a number of conference sites with PW. So far only information sites, but one of my clients organises several conferences per year and has requested a more sophisticated tool that will serve as a kind of Eventbrite replacement. Looking forward to scoping that out and working on it next year.
-
It's a bit scary submitting an edit form with data you know is out of date, but you're right that it doesn't save the data if it's unchanged. So that's a good solution, thanks!
-
I've just been looking at that, thanks. Bummer that it can no longer be easily loaded as a PW page or Process module though:
-
This is something that has been bugging me for ages and I'm hoping somebody knows a simple trick I'm missing. I am viewing a table in phpMyAdmin - in this case the "fields" table: I want to take a closer look at the data column in the link_url row, so I open the row for editing via the "Edit" link: Now in the PW admin I make some changes to the link_url field settings, and want to check the results in the table row. So I want to reload the edit row view to see the changes... but the URL that phpMyAdmin uses for this view is http://localhost/phpmyadmin/tbl_row_action.php - there's nothing specific to the currently edited row in the URL, and when I refresh the page I am sent back to the phpMyAdmin landing page. I figure there has got to be some way to refresh the edit row view without this happening - isn't refreshing a view like this a really common need? Maybe there is some button in the interface that reloads the edit view that I am missing? Any tips much appreciated. P.S. I know I can show non-truncated column values in the table view and also edit column values in the table view, but the interface is much more crowded and busy here than it is in the edit row view, so it's not a great substitute.
-
Combine ^= and %= to find multiple values in a text field
Robin S replied to suntrop's topic in API & Templates
-
FieldtypeDatetimeAdvanced - subfield selectors for date/time
Robin S replied to BitPoet's topic in Module/Plugin Development
I could reproduce this locally too with DatetimeAdvanced v1.0.0, PW 3.0.115, PHP 7.1. It seems that when a new page is created (after the first step of Add Page) the field gets a value of 0000-00-00 00:00:00 in the database. This gets converted to timestamp -62170025400 which then does not pass the conditional that sets the inputfield value to the current date/time. In contrast, the core Datetime field does not set a value in the database until one is saved. DatetimeAdvanced: Datetime: -
@ryan, I'm sure it's just a temporary glitch relating to the ongoing work you're doing on the docs, but I notice that many methods are showing "@since 3.0.110" when they have been around much longer than that. Example: https://processwire.com/api/ref/inputfield/
-
New post: Rebuilding processwire.com (part 2)
Robin S replied to ryan's topic in News & Announcements
This one? https://processwire.com/videos/overview/ Love that video. It was my first contact with PW and after seeing it I was sold.