Jump to content

Clarity

Members
  • Posts

    36
  • Joined

  • Last visited

Everything posted by Clarity

  1. Hello, @fruid! I think it is because of limit of RAM in your php.ini file. You can set memory_limit = 512M or larger instead of 256M there. Very likely the backup consumes more than 256M of memory.
  2. Hello, Ksenia! On a bit unrelated note, you can use Tracy Debugger instead of vanilla `var_dump`. You can output the variables to the debugger using `bd()` function like that: `bd($matches->getSelectors())`.
  3. Hello, @Ksenia! I think it happens because IDs of pages are 1652 and 1674, and `$item` variable converts to ID. When you iterate over pages, you get `$item` to be 1652, 1652 and 1674, which composes into 1652|1652|1674| and then truncates into 1652|1652|1674 when you assign `$final_output` to it. That's why your condition is true and you have "I don't get it!!!" string. For example, if you write on homepage template file `echo $page`, it will output 1 because 1 is the ID of the homepage.
  4. From documentation: "…but findRaw() is more useful for cases where you want to retrieve specific things without having to load the entire page (or its data)". It is a reasoning that findRaw() might be faster in this case, since it won't wait when the page will be loaded.
  5. Hi, @Allan! Could you please explain more precisely the matter of the problem?
  6. Hello, @Violet! It also sometimes happens with me while I'm trying to log in or save the page. Usually reloading the page with clearing cache helps me to avoid this problem. But not sure how to fix it so that it won't appear in the future.
  7. I found the root of the problem. The checkbox "Group fields inside fieldset" was unchecked, and it leads to values of fields being unsaved.
  8. Somewhy when I save a page with fields given by Mystique, content from these fields disappear after saving. Is it a problem with next branch?
  9. Hello, @ukyo! Current variant of Mystique in "master" branch gives the error "You need to select a resource and save field before start to use Mystique." after creation of the page. I don't see that it is possible to select a resource just after creation of the field. Switching to the branch "next" solves the problem. In addition, Mystique will search files in form Mystique.*.php in site/templates/configs, not in site/templates.
  10. I need that because my admin action copies content of fields from one language to another, and we should somehow warn user that languages are identical (since I think it doesn't make sense to copy the content to the same field). I've thought that not allowing to pick language in "destination" fields might solve the root problem, but I already solved my problem using PHP. Just added the warning that languages were identical after successful execution of Admin Action.
  11. I think it is not good if admin's path is known to hacker, since they potentially can brute-force superusers' accounts by this URL and eventually hack someone's account, receiving the access to the Admin Panel. The hackers may know which CMS the site uses from the site https://whatcms.org/, and if they know a thing or two about ProcessWire, they will attack /processwire path first.
  12. Hi, @adrian! I have tried it, but it's not quite what I need - if I pick a value in some field, the other field shouldn't entirely disappear. Only a single value of AsmSelect (which is picked in another select) should disappear from a list of selectable items.
  13. Thank you! I'll try it.
  14. Hi, @adrian! I almost completed writing custom admin action and I have a question. I have a select in which we can pick a single language, and AsmSelect in which we can pick multiple languages. If we pick some language on select, it automatically shouldn't be pickable in AsmSelect. There must be some setting which I miss. Since we pick language on browser (on client side), I'm not sure how to do it in PHP. Could you please point me how to do it in PHP's ProcessWire, without writing own JS for it?
  15. I'm writing custom admin action and trying to figure which types can be written in 'type' field, like in this code: return array( array( 'name' => 'fields', 'label' => 'Fields', 'description' => 'Select the fields you want to delete', 'notes' => 'Note that all fields listed are not used by any templates and should therefore be safe to delete', 'type' => 'checkboxes', 'options' => $fieldOptions, 'required' => true ) ); If these types fully correspond to Inputfields in ProcessWire, then it solves my problem. I was not sure about it. Thank you.
  16. Hello, @adrian! Can you please add the exhaustive list of available types and fields ("name', 'type', etc.) and how to work with them? There are 'select', 'text, 'AsmSelect', etc., but can you please document all the types and fields? Or maybe I'm missing something?
  17. Hi Chris, This error usually occurs when your page is loading too slowly (there might be many reasons of this). It's good to check the performance of the sites where the error occurs.
  18. I personally don't think that forum search is bad - it's quite flexible, you can search with AND and OR logical operators on words, search in different topics and forums, choose whether to search in titles and body or in titles only. What can be improved is searching synonyms for words like Google does, i.e. when we search for "teapot", we also should get results for "kettle".
  19. Hello everyone! I have a cyrillic string transliteration of which I want to use as a name for the new page via cloning another page with a custom title. I'm using this function: function foo($copyFromPage, $parent, $newTitle, $language) { $copyFromPage->of(false); $clone = wire('pages')->clone($copyFromPage); $clone->of(false); $clone->title->setLanguageValue(wire('languages')->get($language), $newTitle); $clone->name = $newTitle; $clone->parent = $parent; wire('pages')->save($clone, ['ignoreFamily' => true]); } Usage of my function is like: foo(65536, 32768, 'Новая страница', 'ru'); I need to translate 'Новая страница' into a name like novaya-stranitsa in order to have a page to be named correctly (now I have hyphen instead of name). Could you please tell me how to do it in ProcessWire?
  20. Thank you, @horst. Possibly that was the core of the problem.
×
×
  • Create New...