Jump to content

Soma

Moderators
  • Posts

    6,798
  • Joined

  • Last visited

  • Days Won

    158

Everything posted by Soma

  1. There is a filter on templates screen above the list..
  2. The template for user in PW. Its a system template so you have to filter for sytem templates.
  3. What I do in a similar situation is save the value ob page save to a field outside repeater. Makes for easy and fast searching with limits and pagination.
  4. I think the page field should be added to the user template and not the news template. As per description the page field is to define page that are invisiblevto the user.
  5. Yes exactly. The pseudo user page can be anywhere and you could add children pages for all kind of things. And only a couple field like prename lastname to the real user template. You dont have to it's up to you. I also think you're creative enough to already see what is possible it's more the code you worry. Let me say in PW it'S REALLY no rocket sience compared to other systems and just keep trying to go with the simple API. Once you learned that you'll do anything with ease. Maybe I'm too modest but I'm also not a hardcore programmer but a design guy, and learned a whole lot with PW. Of course I got some background and did a lot with php. You're in good hands with the guys here.
  6. A posibility I also use is have a page field reference added to the user template and reference the userpage there. Makes it easy to setup and you dont have to care about names as it's already checking for unique username.
  7. Yeah cool but now we don't know what causing the issue on your side... again plz post your specs. Maybe? Thanks!
  8. I'm guessing some autofill plugin.
  9. Modules Manager doesn't check the modules location before updating. Though when you placed it in the wrong spot to begin with manually it get's quirky. Depending on the module and how the user manually installed the module previously and how he named the folder it can mess things up. It's a known issue, I think we need to keep in mind when migrating the ModulesManager to the core soon. Currently ModulesManager creates a folder with the "classname" entered when adding a module on modules.processwire.com, it's the only reliable info we got from the module feed, so it has to take that when creating the folder.
  10. wire("page") in this context will give you the admin edit page and not the page editing. In this case you can get the page edited through ProcessPageEdit. if($this->process = "ProcessPageEdit") { $page = $this->process->getPage(); }
  11. It does not, but maybe you can find out why it does it for you?
  12. What if you copy the tiny_mce_popup.js to your tinymce folder?
  13. I think you need fieldgroup to add fields first and then add fieldgroup to template. Look at apeisa's shop module for examples. Oops or couple posts above nice guy soma has some example.
  14. No there's no way to avoid this, except if you would do $fields = $somepage->fieldgroup; foreach($fields as $f) { $inputfield = $fields->get("$f->name")->getInputfield($somepage); $form->add($inputfield); } This somehow gets around the error when rendering the form. But once submitted you'll end with the same error. Yes you are correct. In PW a page needs to be saved before files can be added or accessed, the PagefileManager requires a page id and since you build it using inputfields in context of a page object it fails. Pagefiles are saved in the filesystem using the page id, and since the page doesn't yet have an id it's simply not possible. For the same reason Ryan's FormTemplateProcessor also only works with text fields. Since you seem to have file fields in your template, you have to save the page to go this route, which I'm sure you don't want. Or remove file fields from the form, which is maybe also not what you want. So you have to build it different and build the form differently, maybe still using the fields from a template, but add your own file field upload. There various threads and example I did a while back. Some are on my gists. Example: https://gist.github.com/somatonic/4150974
  15. But now cheatsheet is a PW site and Ryan can edit it easily himself.
  16. Maybe can you try to change soemthing in RangeSlider? FieldtypeRangeSlider.module in the ___sleepValue method This: $sleepValue = array( 'data' => $range->min, 'data_max' => $range->max ); to this: $sleepValue = array( 'data' => (int) $range->min, 'data_max' => (int) $range->max );
  17. I can't reproduce and I don't have Database.php #118 (empty line) What is the PW version and PHP, MySQL ? The error states that it tried to set a string on the integer field, and there's nothing wrong with RangeSlider. (BTW, your code would need a $clone->of(false), or it will throw an error) $clone = $pages->clone($pages->get('/test1/')); $clone->of(false); $clone->title = 'Test1 Clone'; $clone->name = 'test1-clone'; $clone->save();
  18. The error says exactly what you have to do: Save the page before files can be accessed...
  19. No it's only as complicated as you make it A ship full of. This might work.... Its name is "delete_fieldname_hash" and this is how PW does process it $id = $this->name . '_' . $pagefile->hash; ... if(isset($input['delete_' . $id])) { $this->processInputDeleteFile($pagefile); $changed = true; } So I think you can simply loop the pagefiles you have on page and create the id as above and check for if any checkbox is set and delete the file. foreach($page->pagefiles as $file) { $id = "pagefiles" . "_" . $file->hash; if(isset($input["delete_" . $id)) { $page->pagefiles->delete($file); } }
  20. I have no idea. It doesn't matter where it is on the template, and no matter what settings, I can't reproduce. I think it has more to do with versions PW, PHP, MySQL ... something with that page? Can you create a new page and try cloning that with simple API call?
  21. I never seen this error, and I have no clue, cloning pages with RangeSlider field works just fine. Can you give more hints?
  22. Do you happen to have a RangeSlider field on those pages? Because "data_max" I know is from there.
  23. Sorry, I think I missed this or ignored it because it's very hard to decifer your code and with very little initiative from you trying to find out. You may already have solved it but after taking a short look at the code I think I found something $field->addOption($d,$d); I think the problem is that the $d is a formated date string? Maybe the value (first argument) should be a timestamp... or at least converted to timestamp before assigning to the $page->time. You know that's lots of beer there?
  24. Kongondo. Thanks for doing this but you better wait until Ryan updated the sheet to 2.3 v.
×
×
  • Create New...