-
Posts
10,896 -
Joined
-
Last visited
-
Days Won
348
Everything posted by adrian
-
@hellomoto - it looks like you already fixed the ONLY_FULL_GROUP_BY issue. Unfortunately PW requires that settings is removed. I pointed you to another post that should fix the home template issue you were also reporting on SO.
-
@netcarver - is it time to add PW 3.x to the compatibility options for this module (in the modules directory listing) ?
-
Hi @Mike Rockett - not sure what you think about this idea, but I recently came across a situation where I think it would be helpful if Jumplinks was loaded before the core PagePathHistory module. PPH has set up and automatic redirect on a page, but I hav a more detailed set of rules set up in JL that handles urlsegments using {all}. The problem is that PPH is loading first so the JL rules were being ignored. In this case I decided to manually remove the PPH rules from its DB table, but I think that possible just setting the JL autoload priority setting might also work just fine. Do you think this would make sense in all cases?
-
I completely agree - I always have my editor set to remove all trailing whitespace on save. It makes diffs so much easier to read/interpret because you don't end up with all the whitespace changes that can happen. Unfortunately this has been discussed before and Ryan actually said "I find a space at the end of lines helpful in my editing environment" (https://github.com/ryancramerdesign/ProcessWire/issues/1757). I don't understand why, but it sounds like he doesn't want to change this, although of course that discussion was some time ago.
-
I'd run this check to see if mod_sec is running first and if so, then you can figure out how to disable it.
-
I still wonder about referencing 1092 as a value. I would try an example where you don't do that. I would also try adding a new matrix field - I wonder where there is something different in how the field is created using the version you started with vs the one I attached above. I would also try running that SQL query directly - it looks to me like it's going to correctly insert that "hello??" value. What happens when you try? Also, when you say that there is no change to the DB - do you mean you don't see any change to the table in the PW admin, or that the DB table itself isn't changing - they should be connected, but I would want to verify both.
-
I would recommend persisting - do a little debugging - it definitely works ?
-
When I simplified the code (a few posts above) from what I am actually using, I think I accidentally switched the order of $col and $row when building up $data array. Please try swapping those. But also, I am not sure whether it will work to reference the page the field is on, eg 1092 in your example.
-
I am not sure where I got this version from, but the attached has the addMatrixData() method which allows updating. Take a look in the Matrix.php file for usage of that method. FieldtypeMatrix.zip
-
Same method to update existing values - it will just overwrite the cell that matches the row/column values.
-
I haven't used the API with Matrix in a while, but if you read a few posts above yours, there is some discussion about the makeBlankItem() method being a new PW core requirement. @kongondo said he would implement it, but it doesn't look like it made it into the master or dev branch. I think if you add it yourself (as per the discussion), it should work as expected. As for using the Table module to automatically create columns, I think that will be a lot more work than you might initially think - lots of things to handle if things need to change.
-
Is it a namespace issue? Try: $matrix = new \Matrix(); Otherwise, what's error?
-
RockMigrations1 - Easy migrations from dev/staging to live server
adrian replied to bernhard's topic in Modules/Plugins
We should end our OT ishness ? but there are other similar shortcuts in that panel as well - worth keeping open and seeing what it offers up in various parts of the PW admin. Let me know if you have any other suggestions for features for it. -
I generate and populate the matrix field via the API without any problems. Something like this: $matrix = new Matrix(); $page->of(false); $data = array(); foreach ($xs as $k => $v) { $data[$col->id][$row->id] = $v; } $matrix->addMatrixData($page, $matrixFieldName, $data); $page->save($matrixFieldName);
-
RockMigrations1 - Easy migrations from dev/staging to live server
adrian replied to bernhard's topic in Modules/Plugins
Or in this case you could just use Tracy's Admin Tools panel which has a one-click "delete field" button when viewing a field's setting in the admin ? PS - not meaning to be a downer on your module in general, it's just not necessary for this use case. -
I think that should work, but your if statements are missing the closing ")" You have: if($user->hasRole('competition-secretary') || $user->hasRole('membership-secretary') { return "/members/"; } else if($user->hasRole('member') { return "/members/" . ($user->name); } else { return "/" } instead of: if($user->hasRole('competition-secretary') || $user->hasRole('membership-secretary')) { return "/members/"; } else if($user->hasRole('member')) { return "/members/" . ($user->name); } else { return "/" } The error should go away if you fix the syntax. I think you might also need a closing slash after $user->name to complete the path.
-
module Recurme – Processwire Recurring Dates Field & Custom Calendar Module.
adrian replied to joshuag's topic in Modules/Plugins
@Ben Sayers - maybe direct your attention and efforts to help @bernhard with his new module: -
I have found this library quite useful in the past. If you are going to support recurring dates, please take a look at the inputfield interface for recurme (it works quite nicely), but please make sure if you implement momentjs for any part of that process be sure to use the timezone version of it. I also think the ability to output recurring dates using RRULE (https://icalendar.org/iCalendar-RFC-5545/3-8-5-3-recurrence-rule.html) please be sure not to follow the broken format used by Recurme. I would recommend a full read of the recurme support thread as it raises lots of issues which should help you to avoid them in this module ?
-
Hey @bernhard - those are now the defaults (as per the Tracy core defaults). They are also configurable in the module settings: and you can also override them for a specific dump with: d($obj, 'title', ['collapse' => 1, 'collapse_count' => 1]); which might be handy if you are dumping lots of the same object/array in a loop and you don't want them all open which not only takes up more physical space, but also more reources.
-
Weird - definitely keep us up to date if you find out why.
-
Is this on all pages or just pages of certain templates?
-
Is this speed affected by Tracy at all? Keep in mind that PW's core debug mode kicks in (if it's enabled) when logged in as superuser so there will be some impact from that. I honestly have no idea at this point - I can't see why/how those panels could improve the page tree loading speed - for me the page tree ajax call is definitely noticeably slower with Tracy running - obviously it's a trade-off that I think is worth it though.
-
Remember that if you are a superuser and you have "force su into dev mode" checked, then switching modes won't affect the mode you actually see. How is the performance when you are logged out? Tracy adds content to the DOM, so it should slow things down if anything. Is Tracy logging any errors (even Notices / Warnings)? Do you have any ajax calls - just wondering if Tracy is catching an error early that would otherwise slow things down for some reason? Are you talking about the backend or the frontend of the site being slow? Are they both slow with Tracy disabled? Does Tracy still speed things up with all panels disabled? If not, which particular panel is increasing the speed?
-
When you say "off", do you mean production mode, disabled "by unchecking the "Enable Tracy Debugger" checkbox, or is Tracy uninstalled? If in production mode, do you have emailing of logged errors enabled? I am wondering if you have a slow connection to your email service (SMTP or API).