-
Posts
303 -
Joined
-
Last visited
Everything posted by valan
-
@Zeka hi! This file has only declaration of constants. There should be better sources to learn
-
I'd like to create custom ajax-driven inputfield. Ajax-driven inpufields where introduced here: http://processwire.com/blog/posts/new-ajax-driven-inputs-conditional-hooks-template-family-settings-and-more/#new-ajax-driven-inputfields-system-wide, but since that time I haven't seen any "how-to" tutorials. I'd like to learn from core code, but can't understand which files to check. Can someone suggest which core/module files I have to check in order to learn from code and be able to create custom ajax-driven inputfields?
-
Hi @adrian - sure. Check inbox.
-
Module has been installed successfully, but any module setting change/save results in "Error: Unrecognized path" with redirect to https://.../admin/module/bookmarks/ What's wrong? PW 2.8.35, PHP 7
-
I'm developing few custom module classes derived from WireData and WireArray. They are neither Fieldtype (as do not work with db) nor Inputfield (as not used in rendering). Later they may be used in Fieldtypes and Inputfields. Is there "PW way" to name such type of modules?
-
This issue appeared after upgrade from 2.7.2 to 2.8.35 There are two hooks: - One triggers on ProcessPageEdit::buildFormContent where I add custom fields, e.g. like $form->insertBefore($virtualfield, $realfield);. - Another triggers on saveReady where I get and process values entered in these 'virtual' fields (e.g. $page->virtualfield). Before upgrade it worked. After upgrade, my custom 'virtual' fields are always empty in saveReady hook. Please advice what could be a reason and how to fix it.
-
That was legacy... Changed code to to static, error disappeared. Getting now another error in ProDrafts module. It says "Class 'ProDrafts' not found in /var/www/pw/mechanics/modules/ProDrafts/ProcessProDrafts.module:28". It's here: public static function getModuleInfo() { return array( 'title' => 'ProDrafts', 'version' => 2, 'summary' => 'List, manage and compare draft pages.', 'icon' => ProDrafts::defaultIcon, // error here Edit: issue is fixed by reinstalling the module.
-
I'm upgrading from 2.7.2 to 2.8.35 As usual I've replaced /wire and index.php, but this time upgrade failed. During bootstrap system generates "Call to a member function get() on null" on this code in my custom module class ProcessCustom extends Process { public static function getModuleInfo() { $permission = wire('permissions')->get(self::someId); // error occures here ... I have few thoughts: - either wire('permissions') is not supported in 2.8.35 - or error caused by index.php which significantly changed. In 2.7.2 I've used index.config.php (multi-domain config) and now I'm not sure that bootstrap uses it... Please advice where could be a source of the problem.
-
few (strange) issues with storing/getting null in float field
valan replied to valan's topic in General Support
Yes, Blank and 0 have different meaning. I guess Blank for float = Null. Anyway, hiding field if it's value is null is not expected behavior I think. -
There is FieldtypeFleat field "my_float_field" with setting "Blank and Null have different meanings". I have few (strange) issues with it. (1) Issue number 1 When I want to store null in this field, it doesn't save (or return) null. I want to get null back when I save null and 0 when I save integer 0. What's wrong here? $value = null; echo 'Type=' . gettype($value) . ' Value=' . print_r($value, true)); $page->setAndSave('my_float_field', $value); echo 'Type=' . gettype($page->my_float_field) . ' Value=' . print_r($page->my_float_field, true)); echo 'Type=' . gettype($page->my_float_field) . ' Value=' . print_r($page->getUnformatted('my_float_field'), true)); // Result: Type=NULL Value = Type=double Value = 0 Type=double Value = 0 (2) Issue number 2 This field has Visibility=Open+Closed when blank+Locked If I save null in this field, it disappearas from page edit admin. If there is some value - it shows it normally... If I change setting "Blank and Null have different meanings" to "... equivalent" it also does not help. This looks like either bug or some db issue. I've checked field settings in db and didn't find any strange things there... so tend to think that it is bug. Or I don't understand smth... Please help.
-
I guess this question has been already addressed in some thread(s), but I fail to find complete answer, so posting it here. I know 3 options of accessing API variables from Wire-derived class (see below). Can someone give an in-depth/developer level answer on their relative performance difference and possible limitations (cases when one of these versions might not work as expected - may be PW3 multi-instance related or may be some hook-related issues, etc). 1. $this->pages 2. $this->wire('pages') 3. wire(pages)
-
Today I've experienced interface issue - input fields were hidden (address, etc). After some inspection, I found that reason was in css - map has changed its relative position. I guess Google has changed smth in script that draws map as there were no changes in css locally. Do you have the same issue? To fix the issue I had to add custom style clear tag to InputfieldMapMarker.module line 161 "style='height: {$height}px;clear:left;' " .
-
Hmm... strange to see 0 responses here... is it a right forum thread for such questions?
-
I'm developing single-page application (SPA) which interacts with PW site only with help of ajax post/get calls to custom site API. Initially guest (non-loggeding) user opens page with SPA. Then he logins via ajax call to custom API (requests key, supplying email and pass) and as soon as key is available, makes other ajax calls to custom API with this key. e.g. update own email, phone, etc. Instead of developing custom authorization system, I'd like to use PW built-in authorization. So, my questions are: 1. How to generate key which PW uses to set cookie that is uses to identify session/logged-in user. I guess in my custom API login handler I should create new user session and return some token/key? E.g. how to do that using PW API? 2. Assumed SPA got this key and makes next ajax request to API with this key included in query - how to authorize request / identify user with help of PW API? In sum - I need some guidance on PW API authorization methods that may help me to enable user authorization and access control in custom API from SPA ajax calls.
- 1 reply
-
- 2
-
1. Is PW 3.x compatible with PHP 7? 2. Would you recommend PW 3.0.18+ in production? E.g. is it too "dev" or already "prd"?) 3. Any known PW-related issues with migration from myisam to innodb? 4. Pros/cons of switching to nginx + mysql + php-fpm? (apart of lack of support, e.g. need to maintain config manually with each upgrade) P.S. Currently site is running on PW 2.7.2, MySQL 5.6.29, db by default myisam, PHP5.5, Apache 2.2.22, OS Debian 7
-
@LostKobrakai - see issue here: https://processwire.com/talk/topic/13164-http-error-500-when-opening-some-template-pages/ Described issue happens when script reaches allowed memory limits. I guess it is because ChosenSelect fails to handle too much pages (20000 pages in m case). Anyway, when I've changed inputfield to PageAutocomplete - issue dissapeared.
-
Well... the problem was with field which had ChosenSelect inputfield. Posted issue in module support board - https://processwire.com/talk/topic/8955-inputfieldchosenselect/ Q is closed so far.
- 1 reply
-
- 2
-
Few days ago I've discovered that some specific template pages can't be opened in admin page edit. Browser returns HTTP ERROR 500. At the same time it looks like all these pages are accessible from API, and there is Lister that correctly shows all pages with this template. I've debugged down to core and found that script fails in ProcessPageEdit.module at 220 line: $out .= $this->form->render() My PW core knowledge is not enough to dig further so I need help to find root cause and fix problem. Thanks for any advice. PW 2.7.2, PHP 5.5
-
These topics disappeared from the visible list of VIP forums. There are few bugs/improvement suggestions that I've posted there and I'm waiting updates in new releases. There is no "renew" option in store, as well as no any answer from "contact us" (I've sent message about a week ago).
-
to @Ryan and dev team. It has happened that I've started development of notification system for users and found that there is already SystemNotifications module and related classes in core. Before development of own bicycle I've decided to check if it is required) and/or use a chance to add few wishes at moment when this module is under development. Please could you share thoughts/plans on the following: 1. currently flags in Notification are protected static. It limits possibilities to extend class by adding custom flags and handlers for these flags in FieldtypeNotifications. For example, notification flags for SMS or messengers, like Telegram. They can (and probably should) be handled in FieldtypeNotifications in the same manner as emails. At my site I use both SMS and Telegram notifications. Also, I think preferred notification methods should be set by (or for) user. 2. emails (as well as other "contacts" like cellphone number for SMS, etc) could be taken from different user fields, depending on some condition. In my system for example, sales managers roles need to get internal emails to corporate emails while being users, they get emails from system email field. E.g. "contact fields" should be customizable and/or hookable. 3. currently notifications are removed as soon as user closes them. There could be notifications that require action(s) (e.g. changes at some page); while these actions are not performed, notification should remain. E.g. it is some form of "todo" notification controlled by the system. Also there could be actions which can not be controlled by system, e.g. user should either confirm "done" or "cancel" or "postpone" them manually. Do you consider such "to-do" notifications as something that should be developed separately OR you think that they may be realized in the scope of SystemNotifications? 4. currently at UI level notifications are injected through predefined core js/css and predefined admin DOM structure. This limits possibilities to make notifications UI different. For example, I'd prefer to give my users "Facebook style" icon & attached notifications menu. Is it possible to leave hooks and/or module config params that opens a space for js/css replacement/adjustment and possibly more admin DOM extras (like adding menu items)? Thank you!
-
Failed to switch to Reno. After installation - no any changes, the same default theme. Uninstalled/cleared cache/reinstalled - same(=no) result. PW 2.7 PHP 5.5 EDIT: Well, it works. Occasionally found that theme should be set in user settings. I'd suggest to drop few words about user settings in module config.
-
@kongondo, thanks! I'm not comfortable to inject own js/css into admin code, but looks like I have to.) May be somebody here already has needed js/css code to use with Admin Custom Files. Reno theme doesn't seem to be stable. See here - https://processwire.com/talk/topic/9102-adminthemereno-disappeared/?hl=adminthemereno - at least it doesn't work in my case (reinstalled it twice w/o success).
-
How to fix admin header (e.g. where menu is) on top of the page, making it unscrollable? Admin menu is one of most frequently used elements of UI at my site, so original header scrollability is a bit annoying. It would also be better for notifications behavior as currently it breaks workflow by scrolling to the top as new notification event occurs.
-
It should return array [user_id => [order_id1, order_id2, ...], ...] where both users and order pages should be initially (but in the same query) filtered based on some PW $users_selector and $orders_selector. Each order page has field $order_user (e.g. it links order and user). How SQL query should look like? After few hours of own experiments I probably need help to combine SQL and PW selectors. Thanks!