Jump to content

porl

Members
  • Posts

    110
  • Joined

  • Last visited

  • Days Won

    1

porl last won the day on June 17 2012

porl had the most liked content!

About porl

  • Birthday 07/05/1981

Profile Information

  • Gender
    Male

Recent Profile Visitors

3,855 profile views

porl's Achievements

Sr. Member

Sr. Member (5/6)

56

Reputation

  1. @bernhard I have started a quick test and so far so good. The wikimedia fork is structured differently but I copied the "lib/Less" directory into the RockLESS one (so there is /RockLESS/Less) and modified the RockLESS.module.php file as follows: diff --git a/site/modules/RockLESS/RockLESS.module.php b/site/modules/RockLESS/RockLESS.module.php index a711627..fd455da 100644 --- a/site/modules/RockLESS/RockLESS.module.php +++ b/site/modules/RockLESS/RockLESS.module.php @@ -23,7 +23,10 @@ class RockLESS extends WireData implements Module { public function init() { // load less.php if it is not already loaded // a simple require_once does not work properly - if(!class_exists('Less_Parser')) require_once(__DIR__ . "/less.php/Less.php"); + if(!class_exists('Less_Parser')) { + require_once(__DIR__ . "/Less/Autoloader.php"); + \Less_Autoloader::register(); + } } /** A quick check and the RockSkinUIKit module loads and executes with no more errors. I'm not using the RockLESS module beyond that in this project but I assume that is a sign that it should work as expected.
  2. Hi there I made a change in core/WireInputData.php to allow for a config option to allow multidimensional arrays (created a pull request as below). https://github.com/processwire/processwire/pull/161 I posted this in another topic but realised it hadn't been visited for over a year, so thought I'd start another. I understand the reasoning behind keeping the arrays one dimensional by default, but rather than resorting to having to use raw $_POST arrays etc. I thought a useful compromise would be a config variable to enable the behaviour override. To use, just set $config->wireInputMultiDimensional to true. @ryan is there any chance of this being pulled (or a cleaner/better version)?
  3. @bernhard I'll be happy to when I get a chance. Unfortunately I'm in the middle of a project I have severely underestimated time-wise so I'm not sure when I'll get to it sorry. If you don't get anything useful from me in the near future make sure to ping me again and I'll try to get back to it!
  4. @bernhard I definitely think a more active fork makes sense. If one of use were to fork it for this one-off I think a similar problem would just happen again in future.
  5. I made a change in core/WireInputData.php to allow for a config option to allow multidimensional arrays. https://github.com/processwire/processwire/pull/161
  6. Hi @ryan No problem, if you think it is useful!
  7. Success!!! Completely cleared out everything, rebuilt the field from scratch, readded to the template and now it is working. Very strange that the whole function worked except the delete/insert statements seemed to be ignored, but for whatever reason recreating it all again works fine now. Thanks again for all your help, I truly appreciate it! Whilst I would have preferred a variant of the Table field for my structure I can work around this one. Sometimes perfection gets in the way of things!
  8. Gahhh!! I really can't understand what is wrong. I added some tracy debug lines through the process and all the way to the database call in the addMatrixData() function everything looks good. This is the sql that is built: My original array had 'f' for the 1092/1076 item and this is showing that my test message is replacing it in the sql. The result of the $query->execute(); statement is true, so the database isn't giving any errors. But there is no change to the database!! Saving changes from the back-end works fine, just not using this method.
  9. Hmm okay, will do then. I might clear out everything I've had previously and start fresh. I may have something else somewhere interfering (can't think what it would be, but who knows). Thanks again for your help. Hopefully I can get this!
  10. Still doesn't work unfortunately. Not sure what is wrong with my setup. Maybe I'll just have to resort to using SQL ?
  11. Passing the $page variable to the addMatrixData() function gives an "Integrity constraint violation: 1062 Duplicate entry '1092-0' for key 'PRIMARY'" error (1092 is the page id of course). I also saw that it was requiring an int so I assumed that it actually wanted $page->id. Unfortunately whilst this removed all the errors, now it doesn't store anything any more. Test code is as follows: Am I doing something wrong? 1092 and 1076 are both valid ids for the column/row pages (yes, I know 1092 is the page itself, I've had no other issues with this and my page selectors just happened to include the original page in my test site).
  12. Hmm doesn't seem to work for me, although I had to use the example you had in the original thread with $matrix->add rather than $matrix->addMatrixData since it complained that method doesn't exist. Using this it just adds duplicate values. Am I running an old version or something? Can't see this method in the github repository either. Looking through the old thread messages I saw you asked a similar question at one point but the answer then was to use SQL. Do you know what was changed after that?
  13. One more question: I can now get the Matrix data to be added as you suggested, but is there a similar method to update already existing values (without just writing SQL)?
  14. Gah! Thanks, I read through the whole thread a few times but somehow missed that. I think after reading a certain number of posts over and over your mind just goes blank. I suspect you are correct about the Table module being a bit more difficult to work with. I guess I'll have to think of a way to work with the Matrix module and just create pages for each row or something similar.
×
×
  • Create New...