-
Posts
11,110 -
Joined
-
Last visited
-
Days Won
365
Everything posted by adrian
-
Welcome to PW! Use the autocomplete inputfield: http://modules.processwire.com/modules/inputfield-page-autocomplete/ Let us know if you have any problems with it.
-
Hi @jmartsch - glad you figured out the hidden type and glad you are finding the module useful
-
Ok, I went with a different fix for the UiKit admin theme sidebars that works with the current version of PW and the UiKit theme. If sidebars are enabled, the Tracy debug bar is attached to the main iframe. Please let me know if you notice any issues.
-
@MilenKo Ok, just committed new versions of Migrator and also MigratorWordpress so be sure to update both. Comment dates now working and also fixed an issue with comment status from last commit. I'll look into the comments/tags and homepage issue tomorrow - gotta run
-
Thanks, but I am certain this used to work fully, so I would like to get it back to that state. I have the comment date sorted out, but am working on a couple of other things and have to head out shortly, so probably won't post until tomorrow, so will look again at categories and tags.
-
Thanks @MilenKo - I'll take a look at the comment timestamp issue tomorrow. Could you please PM me the new XML with just the posts. I might also look at working with the full one - we'll see. How did you go with Categories with just the posts in the XML?
-
@MilenKo - thanks for all those details. I have pushed a new version which fixes that eq() error. I finally did a full import of your file and I think I now know why you are having troubles. Your XML is for the entire Wordpress site. I have only ever used this to migrate blog posts. I would suggest that you create an XML export of just posts (I think that's an option). I think that will probably take care of the homepage renaming issue, as well as the categories and tags problems. It's all about the pages being relative to the correct parent and when you import pages and posts at once, it messes that up. Obviously this should be fixed, but I think that for the moment if you do this, you'll get a complete import of all posts - fingers crossed
-
Perhaps you have checked one of these two options in the settings for this module: Prepend site's root path to local/relative URLs? Allow relative/local URLs without "http://" at the beginning? Either of those will break the lookup of the page for getting the title. But again, Page Reference is much better for local links - one of the key reasons is that is stores the page ID which never changes, rather than the URL which may possibly break down the road.
-
@sms - I don't know why that code isn't working for you - it's fine here. Is this live somewhere we can look at? That said, I do think a Page Reference field is more appropriate for your use case.
-
@sms - if it's a local page, then you can get the title of the linked page with: $pages->get($page->AssistedURL)->title; But you might be better using a Page Reference field because then you could do: $page->linkedpage->url; $page->linkedpage->title; If there will be some external links, then maybe a Repeater field with URL and Title fields might be the best option.
-
For anyone who tries out the new sidebar features in the UiKit admin theme, I just wanted to mention that I already have a partial fix (not committed yet) for the problem of the debug bar appearing in each sidebar, along with the main content area. Each sidebar (and main content area) is an iframe, which is why the debug bar gets loaded in each one. The fix I have works for the initial page load, but falls down when you try to edit a page. I have suggested a change to the core/uikit theme to Ryan (in a PM) that will allow me to fix this as well, but I need him to implement first. I'll update Tracy as soon as there is a fully working solution. Cheers, Adrian
-
PW 3.0.56: core updates + Uikit admin theme updates
adrian replied to ryan's topic in News & Announcements
Hi @ryan - spreading my feature suggestions around at the moment - sorry What do you think about having a simple and more obvious way to replace the Page list in the main frame when the sidebars are displayed. I know we can do this other ways, but I feel like this will become a more sought after thing now. For example, for some sites I think it would be great to point to a ListerPro view for example, and I am sure there are lots of other possibilities now that the page tree doesn't have to be the main initial view. -
Module FrontendUser: login, logout and register users / members
adrian replied to pwFoo's topic in Modules/Plugins
You could hook into Pages::added, check to make sure the page has the user template and then create your own logic to notify the admin - eg send an email. -
$page->children() unpublished pages are still shown ...
adrian replied to jrtderonde's topic in API & Templates
Anything hooking into Page::viewable ? -
Sorry - I didn't notice that in your code example you were already using include_once - it seemed like that was the obvious reason for the issue. You shouldn't have to turn off the file compiler to get things working - it takes care of things if you're not namespacing your template files. There must be something that is declaring that function more than once, but if you are certain that all calls to it are using include_once, then I would start by clearing out /site/assets/cache/FileCompiler
-
Probably just a matter of using "include_once" or "require_once" instead of "include". There are several way to prevent PW's file compiler getting involved - do you actually need it off?
-
There is a monolog plugin for Tracy: https://componette.com/nextras/tracy-monolog-adapter/ so if you're already using Tracy for logging errors in production mode (no debug bar), this might be an option. If people are interested in that approach, I'd be willing to add. PS - @BitPoet - not meaning to take away from your approach - just throwing another option out there.
-
@Soma - here's a PR to fix this - thanks! https://github.com/somatonic/PageListImageLabel/pull/4
-
It would be possible (and probably a good idea) to add this functionality to Migrator, but it's beyond what I have time for at the moment I'm afraid.
-
Oh yes, I should mention that I did my testing with 3.0.55, but it should still work in 2.x Thanks for helping to narrow down what might be causing that homepage change. I think it will be a matter of doing chunks of posts (maybe 20 at a time, or something like that) and then narrowing down from there. There must be something weird
-
Glad that worked for you @jmartsch On another note, the new Selector Queries section in the DebugMode panel now includes a "Time" column so you can see how long each of your selectors is taking. Note that #7 is an intentionally relatively slow query to make a point for this screenshot: Keep in mind that caching may get involved here once you reload a page. Clearing the session (eg logging out and in again) will show you the speed on first load for a user. Also, just added a "Logout" icon/button to the PW Info panel - nice shortcut if you want to logout from the front-end of your site.
-
Hi @MilenKo - thanks for the XML file - it was very helpful. I have committed a new version of Migrator to Github that fixes the duplicate comments issue and also now properly sets the approved status of comments. Note that I didn't test your complete file (because it would take quite a long time I expect). I cut it down to 5 posts, but with those everything is now working as expected. I didn't see the issue with the homepage being renamed, but maybe there is one post in there that is doing something strange. Could you please test with a limited set to make sure everything is working at your end. And then try with all and let me know about the homepage issue. If you could narrow it down to a particular post then I should be able to fix. It's probably a good idea to start with a completely fresh PW install (after all your previous attempts, something might be messed up by now) - you can even let Migrator install the comments module and set up the field etc. Thanks, Adrian
-
PageField – return all pages under 'Home', including children
adrian replied to a-ok's topic in General Support
-
Small update that: 1) lets you add: protected $noBackup = true; to your action class to prevent backups (either automatic or from showing the option to backup). This is handy if your action doesn't do any DB writing in which case a backup isn't relevant. 2) lets you populate: $this->output = 'Content for output'; to your executeAction() method. Whatever content is in this will be returned before $this->successMessage and won't be formatted with the green background. This is useful if your action queries and displays info. Hope you guys find these useful. PS - still waiting on the first PR for a user contributed action
-
@MilenKo - sure, send it through - I'll try to test later today.