Jump to content

Soma

Moderators
  • Posts

    6,807
  • Joined

  • Last visited

  • Days Won

    159

Everything posted by Soma

  1. As I said before, it works the way it should. It does get saved with the user id (user logged in or if not as 'guest'). It's there in the Pages::save and does work. If it doesn't work in your case, as I said previous it may has something to do with: Session's usually don't transfer to another domain, even if on same server.
  2. Nope I haven't anything, since those pages are anyway only for admin, I didn't take care of it for now. And it wasn't considered at the time I forked the module. Admin pages have template "admin" I think you have to ask mindplay, I think it's in there in the module configuration screen. But haven't tried.
  3. Ok glad you got it. Please report it in the ProcessPreview thread. Thx.
  4. If you click on the xhr request, what is the response? finished loading isn't telling anything. It should have something like this if it works: {"error":false,"message":"Updated sort for 2 pages"} - ProcessPreview, there happend to be some issue with it. Make sure it's up to date or deinstall it to try.
  5. What browser/version? Does this happen with all pages or only certain pages? If you open console and then drag sort, there's a ajax request happening, does that show any errors? What modules (3rd party) installed?
  6. I already mentioned soemthing about this in here http://processwire.com/talk/topic/2979-multi-language-page-names-urls/?p=29567 LLU just exists because of the lack of what now becomes a core feature. It doesn't make sense to have a slow parser if there's a performant way to do it out of the box now. It just has some small features added which aswell could be done on a per site scenario with some code or module. If core support will have language segments /en/, /de/ support there will be no reason to have LLU anymore.
  7. Still not sure what you want to do or what is wrong. Just to verify. Page modified and created, so modified_users_id and created_users_id get set on page save. You can't overwrite it, since it done on every save. When creating page it set's both, which is desired. When creating page from bootstrap the current user is used to save id according. If you want to overwrite some of it, you'd have to make it through SQL manually. See some post here http://processwire.com/talk/topic/651-set-created-by-creating-a-page-via-api/
  8. That's correct. It's not inside container but outside. Was always like this and should be. Yes, it's fixed and should stay and not scroll with page. Yes that's intentional.
  9. Looks like theres no user logged in in your case because it saves the user logged in with the request. Works fine here. My guess would be PW version or because you are having different domain where you lose login or session or alike.
  10. You could login yourself with API and try.
  11. It's not really tested in IE's but it looks pretty solid so far.
  12. Now Im still confused even more. You say it should always have the same value but still different for each language. My last suggestion works with what?
  13. This has nothing to do with languages anyway.. Your code is missing the ..->url at the end.
  14. Then why do you make it a language field at all? Btw why not just add the field to home and alway get it from there? $pages->get("/")->company
  15. I'm not sure I understand completely. How is the headline (field?) the company name? This is usuall the alternative title on a page. The languages are set/taken automaticly depending what url you you access the user langauge will be set and if entered it will take that language if it is a language field. If language value is empty it will get default language.
  16. Yeah a couple days ago. Glad you got it working.
  17. You mean the label offset? Yeah there's no easy fix I kinda gave up not finding a solution after a while. But in dev branch it's replaced with a ui button.
  18. I just recently did create a code example to generate a language switch with LanguageLocalizedURL that might be of interest. https://gist.github.com/somatonic/5130992 And linked from in the readme of the module https://github.com/mcmorry/PW-language-localized-URL/blob/master/README.md#language-switch-example
  19. Ok sorted it out. You can't use multiple or | with name field in a selector, since name it's not a text field like others. So to make it easy you would have to first check if there's one with "name" found or check for further fields. Here's a working code with some notes you would have in your home.php at the top. if(count($input->urlSegments) > 1) { // not more than two segments throw new Wire404Exception(); } if(count($input->urlSegments) == 1) { // sanitize to make sure it's valid page name $seg1 = $sanitizer->pageName($input->urlSegment1); // search for name since name can't be used with or "|" multiple field selector $found = $pages->get("parent=/landing-pages/, name=$seg1"); if($found->id) $session->redirect($found->url); // if page with name of url segment not found search alternative fields.. $found = $pages->find("parent=/landing-pages/, short_url=$seg1")->first(); if($found->id) $session->redirect($found->url); // if we reached here, nothing found, throw a 404 throw new Wire404Exception(); } In case you want to leave at the short url and not redirect, you could just render the found page and exit: if($found->id){ echo $found->render(); exit(0); } In case you got questions just ask.
  20. Theres some changes that can be done. Ill come back later when im at home. What is vanity url and generic text?
  21. $page->done isnt needed. :-P
  22. Thanks diogo, yeah might some in there that is not needed. It was original from a repeater on page and done months ago so might not all right there for simple page, just edited it in browser quickly. Edited my example. Does it work like this?
  23. To populate a field on save you can create a autoload module (see HelloWorld.module) And do something like this $this->addHookBefore('Pages::save', $this, 'addTitle'); public function addTitle($event) { $page = $event->arguments[0]; if($page->template->name !== "product") return; $page->title = $page->somefield . " " . $page->field2; }
  24. You better not merge but replace the new "wire" folder. Since session module is now in it's own folder (with db session module) this happens if you merge it with old wire folder. So there's 2 instances of the same module.
  25. If the garbage collector on server is set wrong this can happen. The good news, there's is now DB session module in PW since some versions in dev already to handle session via DB. Just install it. https://github.com/ryancramerdesign/ProcessWire/tree/dev/wire/modules/Session
×
×
  • Create New...