Jump to content

Zeka

Members
  • Posts

    1,065
  • Joined

  • Last visited

  • Days Won

    11

Everything posted by Zeka

  1. I have moved my local development domain from .local to .localhost and after this, I'm logged out from admin every time I visit the front of the site. I have tested it on several installations. On .local domain I've used ' $config->sessionFingerprint = 2; '. But on .localhost I have to change it to ' $config->sessionFingerprint = 0;' to solve the issue, but I can't understand why it worked on .local domain, but doesn't on .locahost. Do you have any idea what can cause it? Thanks, Eugene.
  2. I'm not sure at all that this is relative to your case, but I have seen that this setting has some notes about AWS https://github.com/processwire/processwire/blob/master/wire/config.php#L256
  3. Zeka

    hide field

    $your_field->label = ''; //first need to set field label as empty string (important!) $your_field->skipLabel = true; //works only if the label is set to empty string
  4. @dadish While installing the module I get require_once(): Failed opening required ' ... modules/ProcessGraphQL/vendor/autoload.php' There is no 'vendor' folder on the master branch, but it exists on dev branch. Am I missing something?
  5. https://processwire.com/apigen/class-Exception.html#___construct Example https://github.com/processwire/processwire/blob/48fe0769a4eb3d0f5b4732fd01b4b4ed8262d952/wire/core/Fields.php#L165
  6. Hi @Soma. Thank you for your answer. I still have the issue that this code doesn't find the page with non-default language if(input()->urlSegment2) throw new Wire404Exception(); if(input()->urlSegment1) { $pagename = input()->urlSegment(1); $language = user('language'); $match = pages()->get("template=blog-category|blog-item, name={$pagename}"); if(!$match->id) throw new Wire404Exception(); echo $match->render(); return $this->halt(); } but this finds if(input()->urlSegment2) throw new Wire404Exception(); if(input()->urlSegment1) { $pagename = input()->urlSegment(1); $language = user('language'); $nameFieldSelector = $language->isDefault() ? "name" : "name" . $language; $match = pages()->get("template=blog-category|blog-item, $nameFieldSelector={$pagename}"); if(!$match->id) throw new Wire404Exception(); echo $match->render(); return $this->halt(); } Do you have any idea what could be the reason?
  7. Hi @rolisx sort=-date, sort=title http://processwire.com/api/selectors/#sort
  8. @digitex Are you sure that you don't have space character before H and W letters?
  9. @PWaddict I don't think that modifying the core is a good way. Changing this behavior should be available via settings or maybe hook.
  10. @PWaddict What type of page field type you have set up in the settings?
  11. Does this code work as expected? $page->my_page_field->find('selector, sort=sort');
  12. Also consider to use selector as an regular array https://processwire.com/blog/posts/processwire-3.0.13-selector-upgrades-and-new-form-builder-version/#new-selectors-as-regular-arrays
  13. I don't think that it is possible. As a workaround, you can create additional textarea field where you will populate all sanitized content and then search by this field.
  14. @Andreas Augustin Try to change init to ready as on init stage language is not set. public function ready() { $this->addHookAfter("InputfieldTextarea::processInput", $this, "validateShortlinks"); } public function validateShortlinks($event) { $field = $event->object; $text = $field->value; // only the default language, how can I get the other languages? }
  15. You can change label field globally in the setting of ProcessPageList module - {title} | {template.name}
  16. There are several possible ways. 1. Create template as you have proposed. 2. Create custom field type with custom DB table schema. 3. Use Table field from Profields. 4. Use wire $log (actually, don't think that it's an option here) Options 2 and 3 are more efficient from how they store data in DB.
  17. Does anybody get it working with Gmail SMTP? I always get could not connect to the host "smtp.gmail.com": Connection refused I have tried all possible combinations of settings and ports and double check my credentials. The same thing on localhost and remote hosts. Is it something with Gmail? -------------------- Get it working on the remote host, ports were closed. But what can be wrong with the local setup?
  18. Zeka

    ProcessWire on the web

    I have posted this link in some other thread, but as this thread also relevant leave it here Search by "X-Powered-By" header - 8599 https://publicwww.com/websites/"X-Powered-By%3A+ProcessWire"/ Seach by "site/assets/files" - 17384 https://publicwww.com/websites/"%2Fsite%2Fassets%2Ffiles%2F"/
  19. @MarcoPLY You still posting to PHP file. Instead, you can create a template, for example 'ajax'. Create a template file for this template. Now you have endpoint URL for your requests. site.com/ajax/ Then in your template file, you can do something like if($config->ajax) { if($input->post->email) { do something } } else { // $session->redirect("/"); // or //throw new Wire404Exception(); } Furthermore, you can enable URL segments for 'ajax' template and then you will be able to make requests to URLs like 'ajax/form/', 'ajax/cta/' etc. if($input->urlSegment2) throw new Wire404Exception(); if(!$config->ajax) throw new Wire404Exception(); if($input->urlSegment1 && $input->urlSegment1 == 'form') { do something } Hope you got the main idea.
  20. Hi @ngrmm I don't use this module, so it hard to say why exactly it stopped to work, but there is a branch of news from FB. https://newsroom.fb.com/news/2018/04/restricting-data-access/
  21. @PWaddict Here is very useful site http://youmightnotneedjquery.com/ that you want to visit when you try to convert jQuery to vanilla.
  22. Just tried it one more time and I see the same behavior as yours, that's strange. Tried to find something similar in the issues list, with no luck, so just open the new one.
×
×
  • Create New...