Jump to content

Soma

Moderators
  • Posts

    6,798
  • Joined

  • Last visited

  • Days Won

    158

Everything posted by Soma

  1. I seen this a couple times here by Ryan but can't find it. There a method to save a page silently so it doesn't update modified or user when saving a page. Was it $page->save(false) ? Anyone remember?
  2. NO problem, you be blown away again then...
  3. You can even make columns with fieldsets. Tabs and fieldsets are just special fields you create that are actually two fields one for open and one for closing. PW creates the closing *_END automaticly. You then add them to the template and wrap fields with them. You also only need to add the opening fieldset/tab field and after saving PW will automaticly attach the _END field too. I'm surprised so many people miss them, as they are also in the field dropdown when creating fields. FieldsetOpen, FieldsetTabOpen.
  4. It's a special page, not a regular page you edit, with a system template "language". So you want to filter for "Show system templates" on the admin templates list or you don't see it.
  5. Why do you need a band_title? Couldn't it use just title field? No, you have to add them manually. But generally you would want to reuse fields as much as possible for various reason anyway. You don't need a new textfield for every different type, keep in mind you can set label and description, visiblity in template context aswell, so a title could be labeled "Band Title" on a "band" template. There's a Fieldtype Cache that is not installed by default, that allows you to add multiple text fields that will cache them to "one" field allow you to search the cache field.
  6. There's a more link at the bottom of the list. Usually not something you sort manually for such long list. Also you can set the limit in the page list module.
  7. I see this here too, and I'm seeing this behavior for all text fields, so nothing to do with this module.
  8. Looks a little uneccessary complicated. I'm not sure I understand your code and what is "labelFieldName"? You already got the field name "related", which has nothing to do with the label of the field. You can also just use attr(key,value) instead of setAttribute(key, value) To recap you opening example: $category = $fields->get('related'); $field = $category->getInputfield($page); $field->attr("value",$page->related); echo $field->render();
  9. In latest dev? Cause theres no line 232 in wire.php code that would produce this error.
  10. Soma

    FontShop WebFonter

    I want comic sans for the new admin theme
  11. 250 is just a lot. I guess it would take with only outputing titles 1-2 seconds. And how many images are there then if count() takes so much time? $images->count() is another one but same like count($images) I guess. If you really need to do that for such a long list (!) you maybe better of caching it, like saving it to a text field or checkbox if there are images. You could do it after saving a page with a simple hook. So you could check with if($p->has_images) ... Or even cache the whole html to a textfield etc. Already lots of suggestions. Pagination wold be of course the most natural solution as suggested, but not sure what you're trying to do with a list of 250+
  12. I guess you need also some of the inputfields.css and maybe main.css of the admin. Look for some *ColumnWidth classes. Also maybe worth mentioning that some of the admin css only works when you have your content in a ".content".
  13. You have the value already with the $page->related or not? $inputfield = $category->getInputfield($page); $inputfield->attr("value", $page->related); ... This way you populate the inputfield
  14. I never bought or read a web x book, because the moment I'd have read it it's outdated.

  15. What I have since the update to latest dev is this on the very bottom of the admin "pages tree" screen... as mentioned before I thought it was only once but suddenly appeared again: Warning: date() expects parameter 2 to be long, string given in /home/.../wire/modules/Fieldtype/FieldtypeDatetime.module on line 370 Which appears random it seems and I can't reproduce why, but wasn't there before the update.
  16. I quickly looked at the repo and no it's far from good or standard or how it should be or can be. There's just a site folder with modules folder inside that contains a Fieldtype module that is a separate module from another guy. I'm not sure why this module is in the directory and it also isn't installable by ModulesManager for example. I'm sorry as I mind sound patethic, but I always said that we should have clear guidlines how modules repos should be built and that there must be some quality assurance for modules posted to the official directory. This doesn't happen and makes me a little sad. (just a quick glance $pass = $this->sanitizer->text($this->input->post->pass); Just wrong to sanitize passwords...) /rant
  17. BTW I thought I openend an issue with date fields but maybe haven't. But surely mentioned it in some threads that the date fields get saved with a 1970 timestamp 0 which I ran into when checking dates and empty dates. Hopefully it is now fixed.
  18. I have very latest dev from yesterday which fixes cache delete problem. But the problem was today, BUT there was something happening on date field after updating PW on first load... could be that this page I tested still got an issue with it. As since changing values it doesn't happen anymore.
  19. I've testing the scheduler and I had this morning a strange behavior for a page I was testing yesterday where only the publish from is filled with a datetime past the current time. The scheduler is set to 2min. I had the page unpublished and tried to see it would get published and this was what I got in the log for this page: It was getting published and then unpublished at the same time... 2013-12-04 10:30:27 guest http://removed/ Published /de/medien/medienmitteilung/2006/2006_12_22_mm.php/ with publish_from value of 03.12.2013 16:04 and publish_until value of . Current timestamp is 2013-12-04 10:30:27. (SchedulePages) 2013-12-04 10:30:27 guest http://removed/ Unpublished /de/medien/medienmitteilung/2006/2006_12_22_mm.php/ with publish_from value of 03.12.2013 16:04 and publish_until value of . Current timestamp is 2013-12-04 10:30:27. (SchedulePages) 2013-12-04 11:01:58 guest http://removed/ Published /de/medien/medienmitteilung/2006/2006_12_22_mm.php/ with publish_from value of 03.12.2013 16:04 and publish_until value of . Current timestamp is 2013-12-04 11:01:58. (SchedulePages) 2013-12-04 11:01:58 guest http://removed/ Unpublished /de/medien/medienmitteilung/2006/2006_12_22_mm.php/ with publish_from value of 03.12.2013 16:04 and publish_until value of . Current timestamp is 2013-12-04 11:01:58. (SchedulePages) Really strange. And I was trying to find out but couldn't. I set the published_until and tested again but seems like it is gone away. I blanked the publish_until again and still couldn't get the behavior as before. I tested with other pages but no luck. BTW I added before all testing, the suggested text fix you mentioned some posts earlier #180 if($p->publish_until <= $currenttime AND $p->publish_until > 1) I'm not sure what was causing it, and hope it's not something that will give surprises later
  20. Checkboxes are 0 or 1 not "checked".
  21. Ok. Coincidence, as there was an dev update just an hour before I posted this thread which seem to fix this cache problem for me. Will test a litte more but definately the cache gets deleted now correctly it seems
  22. Template caching seems to be just borked... I let PW create a cache file: It is created correctly /5055/4c81f131016c84203e1525aef538e4ed.cache Soo far so good. I go to save the page 5050 (id) and there's no deleting happening, not even a message (only for parent pages, but they don't actually get deleted..) I go to the server and rename the file to: /5050/5050.cache then go to save the page again in admin, and suddenly the 5050.cache gets deleted correctly! So has anyone got template cache working at all or is using it? This is using latest PW dev. Edit: I'm using language support with 3 languages, and I can see it's creating cache for each language like: 4c81f131016c84203e1525aef538e4ed.cache 4c81f131016c84203e1525aef538e4ed_1013.cache 4c81f131016c84203e1525aef538e4ed_1014.cache Also I noticed that the cache files time on the server is 1 hour behind of what a timestamp in php would return.
  23. Anyone has good experience with template caching? I have set the cache for a template, and set the page to clear cache on save and all parents above including homepage. When I save a page I get the message like: Session: Cleared cache file: /home/.../site/assets/cache/Page/1040/1040.cache But the file on server is still there! And the file is not /1040/1040.cache but /1040/4c81f131016c84203e1525aef538e4ed.cache Further more I don't see a message for the current page I save, that the cache file gets deleted, which is confusing again. So when I view the page 1040 which is a parent page I still get the cached file. Permissions are not a problem on server at all and I'm confused and lost to why it doesn't work. Any ideas? Once it would work: Apart from that: How does this work when I save the page via API? Would it also delete all the cache files according to the cache setting?
  24. RE: Ahhh, I think I found what the problem is. It's that I have template cache enabled for most pages. Any ideas how to make it work with cache enabled? If that makes sense at all Edit: Need to analyse this a litte if this is a problem at all. If at least some pages are not cached, or cache gets newly created for any of the pages, it should trigger tha lazy cron. So I can see this is not as much if a problem as I first thought.
×
×
  • Create New...