Search the Community
Showing results for tags 'resolved'.
-
Hi, I've been developing PW websites since 2011, so I'm not a newbie. I just got a new development machine (Mac mini m4) and started reinstalling/transferring my projects. On my MAMP 6.9 installation all moved projects are running just fine, no errors there. However, installing a fresh copy of PW (doesn't seem to matter which version) immediately shows a console error on the first page of installation and therefor preventing me from installing PW altogether. The error is: main.js:843 Uncaught TypeError: Cannot read properties of undefined (reading 'toggleBehavior') at Object.setupInputfields (main.js:843:62) at Object.init (main.js:15:8) at (index):76:25 I'm not sure why this is happening, but I can't seem to find anything on this error either. First I thought, maybe something is off on my new machine, but on my old machine the installer gives me the same error. I've tried downloading from github (zip) and the download link on the website, both are triggering this error. Does anyone have a clue here?
-
I've just discovered something that appeared strange: selectors work transparently, but are actually context sensitive, yielding different results. // Check for a 'hello' tag: $selector = 'template=tag, title=hello'; $existingPages = $pages->find($selector); d($existingPages->count, "✔ No pages, as expected"); // Create the hello tag (noting capital letter): $aTagPage = $pages->newPage(['template' => 'tag', 'title' => 'Hello']); $aTagPage->save(); // Add the newly created page to the empty $existingPages PageArray $existingPages->add($aTagPage); // Repeat the search for the hello tag: $pageArray1 = $pages->find($selector); d($pageArray1->count, '✔ Works ok'); // The following methods fail. d($pageArray1->get($selector), 'Tag hello not found, despite same selector'); d($existingPages->get($selector), 'Tag hello also not found this way.'); d($pages->find('template=tag')->get('title=hello'), 'Not found like this, either'); Output: I believe what's happening here is that when the data is loaded, the selector uses a PHP implementation, and when the data is not loaded, it uses an SQL implementation. And the results likely differ (depending on your exact set-up of database tables and collations). I can see that one solution might be to set collation of all text fields to binary/case sensitive, and just do without being able to search case insensitively; but this would create a lot of problems, since search, especially user-entered search, typically needs to be case insensitive to meet user expectations. So the solution I'm going with for now is to try to programmatically avoid using find() etc. methods on a PageArray. This is quite inefficient. I'd love to know if there is another solution? I read through the Select operators documentation but couldn't find mention of case sensitivity.
-
I added a Select Options field called tags. On the "details" settings tab I chose TextTags (Multiple sortable values) When I edit a page with this field on, and type a new tag name, e.g. 'new', it says it's going to Add new. I press <SPACE> and it renders the `new` as a tag. Then I hit Save and it compain: Removed invalid tag value: new. The UI looks like it's ok for me to add a tag, but hitting Save says otherwise. I see from the API docs: https://processwire.com/api/ref/inputfield-text-tags/ that there's an "allowUserTags" setting, but that doesn't seem to be exposed in the edit field UI? Also I observed that if I add values on for the tags field then I'm only allowed to select those, and not allowed to add new tags. Any help gratefully received.
-
Hi On Processwire 3.0.179 Create a fieldtype image named "img_test" with option "Use custom fields" On the template "field-img_text" add a title field On a repeater matrix, add a new type with the field "img_test" Add the repeater matrix on basic-page Create a new page and add an image in the repeater matrix, in the field img_test and fill in the title field from the image field Save and reload : the title field from img_test in the repeater matrix is empty In older Processwire versions, the first time I saved this custom fields were not saved, but on the second one, yes. Any idea about it ? A bug or a bad setting ?
- 2 replies
-
- resolved
- custom fields
-
(and 1 more)
Tagged with:
-
Hello One of my customers needs to have his site translated by a publisher. He asks me if it is possible to create a role that could only edit the German version of the pages, without permission on the English version. I haven't found any permission related to this need, but maybe it's possible from a hook? Thank you for your help
-
Hi everyone, currently im developing a photographer portfolio-website. Since i deployed it to a live server the API creates a 0x0 version of the each image, which are then correctly downloaded by the browser. (Instead of the appropriate image, specified in the CSS) However, this only happens for guests and other Users (non-superusers). Oddly, this only happens on the homepage. On all other pages, the Images are loaded correctly. I already checked the permissions in processwire and on the server. Afaik they are all correct, allthough i am not the biggest expert in that regard. Any help / ideas are highly appreciated ?