-
Posts
11,206 -
Joined
-
Last visited
-
Days Won
373
Everything posted by adrian
-
Great, thanks for letting me know. I just committed another update which fixes the issues you were having with the Captain Hook cache not automatically clearing when upgrading Tracy. It will now clear when you upgrade, install, or uninstall any modules, click the modules > refresh button, or change PW core versions. Also, uninstalled (but not deleted) modules will no longer have their hooks shown.
-
I might do that sometime when I have more time. On another note, I have just fixed the automatic backup of settings on module uninstall feature. Apparently it wasn't working properly Anyway, I think it's really useful so you know you can easily restore settings after an uninstall - very useful for some of the more complex modules out there.
-
Hey @bernhard - please try the just committed: 4.3.23
-
Do you mean that you are still getting the out of memory error, or something else?
-
That's one +1 vote That would explain it - now to figure out how to fix it. Ideally it would be good if libraries included in PW modules were excluded from the Captain Hook search (since there obviously won't be any hookable methods in them), but not sure there is a foolproof way to do that. I think an easy fix (which should work in most cases) is to do an initial check for "___" in the file before scanning fully. This will only fail if a vendor library also uses the three underscore method prefix approach. I'll try this and see how we go. It's actually a nice speed improvement for the panel (when not cached), so a good thing to do regardless. Please try the latest version, remembering to clear the cache, and let me know how it goes for you.
-
Soma's module already includes it - it finds all WireCache caches automatically - note "TracyCaptainHook" at the bottom. I am tempted to incorporate the features from his module into Tracy - it seems like an appropriate feature to have and I do like having less modules to install/update. I'll have a think on it for a bit! Anyone else have any strong feelings on this?
-
The Captain Hook cache should be reset when you update any modules (including Tracy), or the PW core, so it should already be taken care of, but just in case, go to the database "caches" table and delete the "TracyCaptainHook" row. Great!
-
Yeah, I agree it's really weird - I just decided to show the link as a raw URL instead!
-
Please see if this helps to identify the error: https://processwire.com/talk/topic/17089-images-disapear-after-uploading-and-saving/?do=findComment&comment=150139
- 12 replies
-
I would only create the page if the user answers the first step of the quiz (to avoid empty pages). And yes, I would pass the ID of the page to each successive step of the quiz.
-
If outputformatting is off it will always return an array.
- 4 replies
-
- 4
-
-
- error 500
- Pageimages
-
(and 1 more)
Tagged with:
-
You're running into PHP scope issues. You will need to use: $this->wire('user')->name; Same goes for $pages - use: $this->wire('pages')->findOne .......
-
Small update to the ProcessWire Info panel which adds a new redirecting "Login" button. Obviously this is only relevant if you have checked the "Force Guest Users into Development Mode on Localhost" option in the config settings. I always do this because I like the Tracy debug bar enabled whether I am logged in or not when developing. The nice thing about this login button is that it redirects to the page you were on when you clicked it, so you can be viewing a page on the frontend of your site, click this button, enter your credentials and you will be automatically redirected back to the page you were viewing. Showing the login button: And if you are already logged in, then you'll get a logout button instead (which also returns you to the current page after logout):
-
Call to a $page->field from within script
adrian replied to creativeguy's topic in Themes and Profiles
Not sure if this helps, but this PW video fieldtype (https://github.com/adrianbj/FieldtypeVideo) makes use of http://www.mediaelementjs.com/ to play videos in HTML5 with a flash fallback if there is no browser support. -
Thanks - I took a look and your /wire/config.php file is missing these lines: https://github.com/processwire/processwire/blob/57b297fd1d828961b20ef29782012f75957d6886/wire/config.php#L869-L906 I just realized the issue - you mentioned that you are running PW 3.0.36. The latest stable version is 3.0.62 and the latest dev is 3.0.74. If you update to either one of those, all your errors should go away. I am curious how you ended up with 3.0.36 - where did you download that from? OT - did you intentionally restyle (colors) the Tracy console panel, or is that CSS leaking through from your site somehow?
-
It sounds like there is something missing from your /wire/config.php or your /site/config.php is overwriting the $config->dbSqlModes setting in /wire/config.php That might explain why the ONLY_FULL_GROUP_BY is not being disabled. Could you please post both of those config.php files - PM them to me if you prefer. PS - this is what I see:
-
Thanks - actually it would be great if you could enter this in the Tracy console panel and tell me what it returns: d($config->dbSqlModes); $minVersion = '5.7.0'; $serverVersion = $database->getAttribute(\PDO::ATTR_SERVER_VERSION); if(version_compare($serverVersion, $minVersion, '<')) d('false');
-
PW does tend to make use of a lot of efficient sql queries, so even though 203 queries are a lot, they are normal and fine in PW. Something I had forgotten about - PW actually disables the MySQL only_full_group_by setting. Whether this is the correct approach or not is debatable, but that is how it is currently supposed to work, but it seems like it only works for MySQL 5.7.0 or greater, so I am guessing you have an earlier version that still has the only_full_group_by setting enabled. What you can do though is add the following to your /site/config.php file: $config->dbSqlModes = array( "5.6.0" => "remove:STRICT_TRANS_TABLES,ONLY_FULL_GROUP_BY" ); Note that I have used 5.6.0 as an example - you will need to find the version of MySQL that you are running and use that instead. This should take care of all those errors. Please let us know how it goes.
-
Hey @bernhard - I took another look at the $wire variable not being available in ready.php (and init.php / finished.php) and this has been fixed in the latest version. Please confirm it all works at your end please.
-
Hi @bernhard - that $wire issue is interesting. I will take a look soon. As far as the memory limit issue with Captain Hook - I reduced my memory down to 64MB and it still worked. I had to go to 32MB to get the error so I am wondering what file caused the error on your system. Could you please debug the path of $file in this function: https://github.com/adrianbj/TracyDebugger/blob/8b92a7d6aec5d9999a77f591496fe8b3ed32080b/panels/CaptainHook/CaptainHookSearch.php#L44 Hopefully that last one to be output should be the file that is causing the limit to be reached. That will at least give me an idea of what is going on. I could of course just set a higher memory limit for this panel, but would like to see what is causing it to fail first. Thanks!
-
The modules manager module hasn't been tagged as PW 3 compatible. I honestly don't really think it is necessary these days - we have such an easy way of installing modules directly in PW by their class name.
-
What type of field is "group" ? There doesn't appear to be anything wrong with your original selector, but I am wondering if maybe it's a Page Reference or Options field type. It would be great to see exactly what the SQL query is (the one coming from that selector). Do you have TracyDebugger installed? If so, take a look at the PDO queries section of the debug mode panel and see if you can find the query for us please.
-
That fatal error is an interesting one and suggests a possible bug in ProcessWire. You should not have to (and probably shouldn't) disable that mysql setting. I would like to know what selector in your template (that calls the PageFinder) is resulting in that error. Is it possible for you to narrow that error down to a specific $pages->find selector?
-
I am not sure why you disabled the file compiler. If you leave that turned on you shouldn't even need to add the namespace to the top of the module files. Was there a reason you chose to disable it?
-
@hellomoto Can you please check your phpinfo (via Tracy if you have it) and let me know if tokenizer is enabled.