-
Posts
10,902 -
Joined
-
Last visited
-
Days Won
349
Everything posted by adrian
-
I've always been using it too - I have just seen several comments throughout the forum saying things like "while the module directory updates, please grab the latest version from Github", so I thought I'd mention it for those that don't know. Agreed - we need to go through and tag our modules with 2.5 where appropriate. Lots of other things need doing with the modules directory too like making it more obvious what the version compatibility is from the summary page, rather than having to view the details page. But these things have been discussed elsewhere.
-
Just a reminder to all the module devs out there. If you commit an update to your module to GitHub, you don't have to wait the normal day or so for it to be updated in the modules directory, Modules Manager, Check for Updates link, and the in new Upgrades Module. You can simply edit the module in the modules directory and save it again. That should update the version from Github. If you are using the info.json approach then just manually edit the version number. Often this is not that important but if you discover a critical bug and want to make sure people can get the new version easily and immediately, this is a good idea!
-
Chris, This is a total stab in the dark here, but any chance you also had either the AutoName or PageRenameOptions module installed? There was a bug in both that allowed for system template names to be changed - would only happen to the user template if the title field was added (it's not there by default, but it is added with this module). The bug has been fixed on both modules as of today, so if that was the issue, make sure you update those modules and everything should be fine. The good thing to know is that it would have just been a matter of opening up PHPMyAdmin to see the name of the user in the database - log in with that and you'd have been fine. So very sorry if it was one of those modules that caused the problem, but glad you managed to restore things ok. If not, I'll defer to kongondo.
-
Yeah, but your option is way nicer once you get to more than a couple of options like this
-
You are not using a PW selector. This needs to be in PHP syntax: if($page->template->name == 'home'|| $page->template->name == 'project' || $page->template->name == 'projects' || $page->template->name == 'posts' || $page->template->name == 'partners'){ But maybe instead you could see if the $page->sidebar actually exists. Maybe that won't work in your scenario, but thought I should mention it just in case.
-
Thanks for your thoughts Antti. As for the 20 000 pages recursion writing to the database - admittedly I haven't studied the PagePathHistory module, but from what I have seen, it only stores the path to the parent page that was actually changed, eg news with the id for the page which is now named latest-news. It doesn't store rows for each of the child pages. Or sorry if I am missing your point? Ajax polling is definitely a good point, although I don't usually have pages that are called via ajax editable by non-superusers, but I guess this could definitely be an issue in some cases. I like to plan too, but clients often don't
-
Why does it break ithe 20000 news items if PagePathHistory is installed. What doesn't it work for ? Is there something I haven't come across yet that we all need to know about ? Whether they should be installed on a live site is a matter for each developer, but during development I do think that a tool that matches the name to the title is very useful.
-
Find most efficient solution for storing multiple values in a field
adrian replied to gebeer's topic in General Support
https://github.com/ryancramerdesign/ProcessWire/blob/576a5d30153f045daa94a136a6ba981650632b26/wire/core/WireArray.php#L833 -
Find most efficient solution for storing multiple values in a field
adrian replied to gebeer's topic in General Support
What about: $editpage->ad_publish_at->removeAll(); I haven't tried it with a custom table like this, but I think it should work. -
Yes, you can call $pages->imagefield->first()->url or $pages->imagefield->eq(n)->url in separate spots in your template, but that doesn't mean it is easiest in all situations. Typically using one images field with support for multiple images is good for sliders/carousels and image galleries, and for insertion into body text, but if you are talking about wanting to add a specific sidebar image and a main article image or similar setup, I would go with two separate image fields set to support only one image. It really depends on your scenario and what works best for you and your clients.
-
Does it really matter so long as you have Page Path History installed given that it automatically sets up 301 redirects? I think some users would definitely like the rename only on first time / initial publish. Thinking about compatibility with PageRenameOptions - I think the key settings would be "Initial Differences Protected" and "Live Changes Protected" along with the role based exemptions for these rules. I guess the biggest problem is that your module works on page page, whereas mine with via JS to change the name on the fly. It might actually be a bit of a challenge to reconcile both. Also, I have a bug for you - your module is also affecting the names of users - I expect there might be other things to that will be changed by this that shouldn't be.
-
If you're in a rush, try this in Modules.php at line 837 Note: Fully untested if($info['name'] != 'ServicePages') is the new bit. if($module && empty($options['noPermissionCheck'])) { $info = $this->getModuleInfo($key); if(!empty($info['permission']) && !$this->wire('user')->hasPermission($info['permission'])) { if($info['name'] != 'ServicePages') throw new WirePermissionException($this->_('You do not have permission to execute this module') . ' - ' . $class); } }
-
[2.5.3 Stable] Something's wrong with the Modules page
adrian replied to Mike Rockett's topic in Modules/Plugins
There are two things going - the enter button I think has always done that - definitely annoying and needs to be fixed. The SEO module hasn't been approved yet, so it won't be available to install via class name. The easiest way is to use the "Add Module from URL" option and enter this: https://github.com/NicoKnoll/MarkupSEO/archive/master.zip -
How to contact Module Developers? when things don't work or buggy?
adrian replied to lisandi's topic in Modules/Plugins
Glad you got the permissions sorted out. I have filed a feature request on Github for adding those links to the info pages of installed modules: https://github.com/ryancramerdesign/ProcessWire/issues/746 -
How to contact Module Developers? when things don't work or buggy?
adrian replied to lisandi's topic in Modules/Plugins
You make some good points. When installing a module you see a screen like this: I think it would be great if the: Links More Information / Project Page / Support Page section that is present on this page was also present when viewing the details of a module once it is installed. I definitely think this is something that should be added and gives direct one click access to all the pages related to the module. Sorry for the "could not remove" errors you are getting with those two modules of mine although it sounds like a file permission problem on your server. Would you mind telling me your apache owner, the chmod values of those two files that won't delete, and their owner/group. -
How to contact Module Developers? when things don't work or buggy?
adrian replied to lisandi's topic in Modules/Plugins
Hey Andi, My general recommendation would be if it is a support question or feature request, then post to the form support thread for the module. The thread is usually linked from the big blue button on the module page. I did notice that Rob doesn't have a support thread listed for Page Edit Fold Status so in this case I would PM him from this forum. If you have a confirmed bug then it might be best to submit an issue straight to the Github for the module. Does that work for you? EDIT: Actually if the modules page is still showing that it needs updating, that is probably just because you need to refresh your modules cache: Modules > Refresh It is unlikely that it is an issue with the modules themselves. -
I updated my last post with lots more info about url segments that should be helpful, but also, if you are on: http://tjmahaffey.com/blog/categories/user-experience/ then $page->name should still return "user-experience"
-
http://tjmahaffey.com/blog/cron-legacy-scheduling-a-mysql-query/ "cron-legacy-scheduling-a-mysql-query" is not a url segment - it is a child of the blog page. All you need for that is to echo $page->name Nico mentioned this above already. URL segments are extra paths added to the url as a way of passing values to the page. Instead of: http://tjmahaffey.com/blog/cron-legacy-scheduling-a-mysql-query/?boolean=true&this=that echo $input->get->boolean; // true echo $input->get->this; // that You can do: http://tjmahaffey.com/blog/cron-legacy-scheduling-a-mysql-query/true/that/ echo $input->urlSegment(1); //true echo $input->urlSegment(2); //that
-
You're right - probably just because it isn't approved yet. Adding edit to the url - with url segments enabled did the trick, but I am concerned that there will be issues with your module relying on segments if the dev also wants to use segments for controlling output on the frontend. It might be better to just go with: /?edit=1
-
Hey pwFoo, Just a couple of things - it isn't possible to install your module directly from the modules directory because the bitbucket link doesn't work properly. FormHelper did download and install automatically though, so maybe you just need to tweak something with the url to your module. Next thing - I installed and put: $fcm = $modules->get('FrontendContentManager'); // edit page (editable permission needed) echo $fcm->edit($page); in a template file, but nothing was output and I was logged in as a superuser. Am I missing something obvious?
-
Hi Marvin, I love it, although I am surprised you got a like from Antti on this, given his dislike for changing the url after the page has already been created I wonder if it might be nice to have an option to determine whether the rename will happen only the first time the page is created, or if it can change every time the page is saved (the current behavior). Just a thought - if you could check to see if my PageRenameOptions module is installed and check its settings to see what behavior is selected and honor that ? Just an aside - your module seems to works quite nicely with my Redirect IDs module. If there was a setting in your module to prevent subsequent renames, Redirect IDs could ensure redirects work so long as they use something like "id title" in your config settings. I know PagePathHistory would also be effective. Just exploring all the different options we now have
-
And if you want to avoid messing with core files try using Martijn's awesome Admin Custom Files (http://modules.processwire.com/modules/admin-custom-files/) to add that CSS.
-
Importing MODX template variables into a new PWire structure
adrian replied to creativejay's topic in Getting Started
Regarding the backup and restore option that owzim mentions. It is indeed very cool, but there's a bit of a problem with it at the moment. Any new fields that get created by your import script won't have the DB table removed when you run the restore which will result in table already exists errors when you run the script again after the restore because the field has been removed from the fields table so PW doesn't know about it anymore, but it's field_fieldname table is still there. Hopefully Ryan will sort out a fix for this shortly. Of course if your import script isn't creating new fields (or anything else that adds a DB table to PW), then this won't be an issue. -
Makes sense, but what happens if they aren't logged in and there is no cookie set ? One thing I just noticed - if the user is logged in, you set $me to the user object and not it's id, so when you do myrank($me), it won't work! myrank($score_me) should work in both cases though.