-
Posts
11,194 -
Joined
-
Last visited
-
Days Won
373
Everything posted by adrian
-
-
@Karl_T - I think your PHP7 issues should be fixed with the latest version. Please let me know if you find anything else amiss. @mel47 - any chance of that test file that you are trying to import?
-
There are no namespaces in 2.8 - otherwise it is identical to 3.x. 2.8 is designed as an ideal upgrade for already live 2.x sites. $dmcs = wire('pages')->find("template=dmc, DMC_represented=1, sort=DMC_country_represented, sort=parent.title");
-
This is reminding me of this post: Try adding the sort to your selector. Not sure if we have a weird bug going on here. Would be good to know what version of PW @bmacnaughton is running and also if you have the same problem on 2.7.3, or 2.8.x or 3.x
-
Yeah - sounds like it must have been an error in the code you typed. Just to clarify - you are back on 2.9.2 now and it's working fine in 2.9.2?
-
-
Hi @Karl_T and @mel47 - I am very sorry for the lack of response here. I have been low on time lately and spending most of it on TracyDebugger. @mel47 - I'll look into the html tags being lost on import - any chance you could PM me the file you are trying to import? @Karl_T - I know what the issues will be - just need to set myself up with a PHP7 testing environment and track them all down. I'll see what I can do about getting both of these taken care of this week. Thanks for your patience.
-
Hey @Peter Knight - I haven't used this module, and I know you said it is working on identical servers, but I would still start by updating the module (https://github.com/ryancramerdesign/LoginNotifier/blob/master/LoginNotifier.module#L102) to use wireMail (https://processwire.com/api/ref/mail/send/) so you can make use of SMTP, rather than php's mail() which can problematic for a variety of reasons.
-
I gotta say, I am super-impressed with the effort you have put into the settings for this module - so user friendly and beautiful! I have actually been thinking about adding user-roles for some panel permissions in Tracy and having a nice, compact, and functional settings interface like this would be exactly what is needed. After that glowing compliment can I say one negative thing I do wonder about the greyed-out checkboxes - they look to me like they can't be checked (disabled), rather than just not checked. It even affects the module uninstall checkbox which actually uses this visual cue to let you know that it can't be uninstalled.
-
A few more updates to the Module Disabler. The "restoremodules.php" script now works without bootstrapping PW, so it will work even if a disabled module has resulted in a fatal error. Also added restore instructions to the panel.
-
I have spent some more time on the Module Disabler panel to make it easy to restore things if disabling a particular module breaks your site. Ryan has mentioned that there are some situations where this may happen and there is no way to avoid it, so I think this panel is now the safest way to disable modules for testing purposes. Whenever you disable any modules, a backup of the "modules" database table is automatically saved. To restore you have two choices: Copy "/site/assets/cache/TracyDebugger/restoremodules.php" to the root of your site and load it in your browser OR Execute "/site/assets/cache/TracyDebugger/modulesBackup.sql" manually (via PHPMyAdmin, the command line, etc) After you run the restoremodules.php file, it will automatically remove the backup file and itself from all locations. Please let me know if you notice any problems or have suggestions for improving this.
-
I am sorry @Dakrtom - now you have completely lost me
-
Just been toying around with this a little more. You can now backup the settings for any module anytime you want using the "Backup Current Settings" button. You can also "Restore Settings from Backup" at any time. By default it automatically backs up the settings of any module when it is uninstalled, but you can turn this off if you want. Even with it on, restore on reinstall still has to be manually triggered anyway, so probably no real reason to turn off. And of course you can still manually import settings that you have pasted in from another install. Anyone have any further thoughts? In particular I am looking at @tpr (AOS) and @horst (ALIF) because they are the two module authors who I know have built some sort of dedicated settings backup / migration into their modules. Do you think it would be weird having this module installed and adding this functionality on top of what you have already built into your modules? I guess ideally if this functionality was in the core it wouldn't be an issue because you'd know that everyone has access to it, so no need to build it in.
-
No problem - thanks for the explanation. Seems like one of those rare times I can see a valid use for the silence operator. I think I'll add it to all the strtotime calls in Tracy which should at least prevent the error for you.
-
Thanks @gmclelland - but I have been running 3.0.33 for a couple of hours now also and not seen this. Looks like an ajax error - any chance you could look at the network tb of the dev console and see if you can find the error?
-
Thanks - I wasn't sure what was used (I should have looked at your previous post) - I always use gtmetrix so just went with that.
-
https://gtmetrix.com/reports/cmscritic.com/IHjrEiKy The page load is substantially quicker (3.2s) and there are a lot less requests (61), but the score is still a D due to a few things which should be easy fixes, and are not PW related. The page is still 2.5MB, but again, not a PW issue.
-
But what if it's not installed? I am guessing you will revert to a popup? I am sure you won't, but please don't automatically install it
-
I have updated the screenshot and added in Jonathan's details - I have kept Ryan in there as well because he did the initial coding which I think formed the basis for what Jonathan worked from. Hopefully that's all ok.
-
Just wanted to let everyone here know that the Console panel just received a fix regarding UTF8 encoding: The first time you load the console after the update you'll see your code as base64 encoded, but once you enter something new it will work fine after that. Please let me know if you notice any other problems.
-
Hi again, Ok, the console panel in the latest version of Tracy now works fine. When I initially coded it I was using GET not POST (I don't even remember why, but obviously a bad idea), but it meant I needed to base64 encode everything which was breaking the UTF8 of your content. Even though I switched to POST even before I released it, I never removed the base64. I could have recoded it as utf8 which actually does work, but I think the right thing to do is simply remove the base64 encoding, which has also made the console much snappier. Anyway, you will notice that the first time you open the console (after upgrading to the latest version) that the contents will be base64. After that you should be fine. Please let me know if there are any other issues along these lines or any other situations where you feel you can't trust the console panel. PS Sorry for the time everyone spent on this!
-
I can confirm that it works fine here from a template file, but as @LostKobrakai there is something in the Tracy console AJAX request that is breaking the encoding. I'll try to look into it sometime today and provide a fix if I can.
-
The code I gave you does pretty much that assuming you have a separate field for the teaser (I called it summary). If you want an automatic teaser than you need to truncate the body field (or whatever you might have called it). Instead of $article->summary, you can try something like: substr($article->body, 0, 300) Of course you can get much fancier with automatic teasers, but that is a PHP question and there are lots of answers on the web about that. Also, if you want the code I had to work from the homepage while the articles are perhaps under an Articles child of home, then try this: foreach($pages->get("/articles/")->children("limit=10, sort=-published_date") as $article) { echo "<a href='$article->url'>$article->title<\a>".substr($article->body, 0, 300); }
-
I also just removed the horst-n author name from the dropdown list of authors.
-
My guess is that you mean a list of articles with perhaps a summary and then each one links to the full article. You would construct your site to have a child page for each article. Then you can do foreach($page->children("limit=10, sort=-published_date") as $article) { echo "<a href='$article->url'>$article->title<\a>$article->summary"; } That will display titles and summaries of the last 10 articles with direct links to the page where the full article lives. Apologies for the brevity and code formatting - not a good idea to try this on a phone while your laptop is running updates