Jump to content

flydev

Members
  • Posts

    1,360
  • Joined

  • Last visited

  • Days Won

    49

Everything posted by flydev

  1. @neophron You have to create a new page Test with the sectionTest template under the root page Sublime PW.
  2. I could be wrong but.. you are trying to modify a protected property directly and that the reason. As you know, you can't modify directly a protected property outside his class. and you have to use a setter to modify this variable. Try #2 : Generally speaking, the properties on an object will be set to protected and so attempting to access a property in this way will cause an error. So what actually happen here. The property $page->prop doesn't really exist and a magic __set() is written, and also a magic __get() function is written which will return a value when you read from this property. PHP will automatically call it for you when you try to access a property that is not one of the object’s public properties. If you try to set a property that is not accessible, the __set() magic method will be triggered. Its important to stipulate here that the return of this __get() magic function is a VALUE and not a reference (&__get()). If it was a reference that have been be returned by the function, you could modify the returned property. Assigning a variable directly to it can work if there is a corresponding magic __set(), but here you cannot modify it, since its actually a function which return value (and not a reference!) : the key is here So, basically, we can say that you are trying to do the following : $page->__get('prop')[] = ['d'], which doesn't mean anything, and PHP will trigger a notice of type : Indirect modification of overloaded property
  3. Yes yes, everything is working fine @adrian check my edited post.
  4. Not working. Nothing ? Ok, its working now. I needed to clear again the session/cookie after saving the module.
  5. Upgraded to PW 3.0.106 and the notice is gone. Anyway, my IP isn't recognized as EU user. I tested also with a VPN installed on a city - 10km far from me - the cookie bar do not appear (I still not tried to debug it!) It is working for you for the EU users ? Edit: When I go to https://extreme-ip-lookup.com/json/ everything look good.
  6. I just installed it to try it, then I checked "EU users only", after saving, I got a warning (not tracked down) and the cookie-bar do not appear. 1× PHP Notice: Undefined offset: 2 in /www/sites/prodels/wwwroot/wire/core/WireHttp.php:894
  7. @neophron if you want a cool example of a onepage site with section as subpage, install and take a look at this profile :
  8. After an upgrade : 2018-05-09 12:39:13 Detected core version change 3.0.88 => 3.0.101 2018-06-23 14:27:03 Detected core version change 3.0.101 => 3.0.106
  9. hi @rareyush We need some code to read, also we need to know if there are some custom hooks, we also need to know how you send emails, eg: native mail() function or WireMailSMTP, etc please give us more info ? More info : https://processwire.com/talk/topic/17441-loginregisterprofile-module-how-to-change-default-from-email-address/ https://github.com/processwire/processwire-requests/issues/122
  10. Yep I see, it happen to me with LastPass (could be something different here) but to be sure, did you tried by disabling the PasswordManager ?
  11. Could the culprit can be a Password Manager like LastPass or another one ?
  12. Hi @sebr , there you go... Note : All the other tasks have as destination wwwroot/assets/dist then the hash task grab the files in this folder and have as destination wwwroot/site/templates/assets/dist then the two tasks below use and rename files in wwwroot/site/templates/assets/dist and update the _main.tpl file : My dir tree : wwwroot --- assets ------ bower_components ------ node_modules ------ dist ------ css ------ js ------ ... ------ gulpfile.js ------ bower.json ------ package.json --- site ------ templates --------- views ------------ _main.tpl --------- assets ------------ dist ------------ controller1.php ------------ controller2.php ------------ ... --- wire --- index.php --- ... // require var path = require('path'); var fs = require('fs'); var gulp = require('gulp'), hash = require('gulp-hash-filename'), replace = require('gulp-replace'), foreach = require('gulp-foreach'); //tasks gulp.task('hash', function() { return gulp.src(['dist/*']) .pipe(hash({ "format": "{name}.{hash}.{size}{ext}" })) .pipe(gulp.dest('../site/templates/assets/dist')); }); gulp.task('main-tpl-css', function() { return gulp.src('../site/templates/assets/dist/*.css') .pipe(foreach((stream, file) => { var id = basename(file.path).split('.'); var regexp = new RegExp("\\echo \"<link id='"+id[1]+"' rel='stylesheet'.*", "g"); return gulp.src('../site/templates/views/_main.tpl', { base: './' }) .pipe(replace(regexp, "echo \"<link id='"+ id[1] +"' rel='stylesheet' type='text/css' href='{$assets_url}dist/" + basename(file.path) + ".css'/>\";")) .pipe(gulp.dest('./')) })) }); gulp.task('main-tpl-js', function() { return gulp.src('../site/templates/assets/dist/*.js') .pipe(foreach((stream, file) => { var id = basename(file.path).split('.'); var regexp = new RegExp('\\<script id=\''+id[1]+'\'.*>', 'g'); return gulp.src('../site/templates/views/_main.tpl', { base: './' }) .pipe(replace(regexp, '<script id=\''+ id[1] +'\' src=\'{$assets_url}dist/'+ basename(file.path) + '.js\'></script>')) .pipe(gulp.dest('./')) })) });
  13. The best Debugging solution so far for ProcessWire ! ? https://processwire.com/api/ref/session/set-for/
  14. Hi Margaret, I remember to have read something about this issue. you could try in first instance what is stipulated on the following thread then let us know :
  15. As you said, get the array from session in a temp var, insert your new item then assign back the array to the session var : $order = array(); $order['token'] = 'token'; $order['product'] = 'product-name'; $session->order = $order; bd($session->order); $tmp = $session->order; $tmp['price'] = 'price'; $session->order = $tmp; bd($session->order); Or use $session->setFor() : $session->setFor('shop', 'token', 'token'); $session->setFor('shop', 'product', 'product-name'); bd($session->shop); $session->setFor('shop', 'price', 'price'); bd($session->shop); $session->setFor('shop', 'price', 'new-price'); bd($session->shop);
  16. A small news about Duplicator and why its not updated recently: On the current state of the module, it is usable for small website, I mean small database (I am aware of the issue which include the parent directory in the compressed package which make the package non deployable by the installer). As stated by Ryan itself, If you are working with really large files, it may be better to perform that task directly in PhpMyAdmin or the native MySQL client. And as I am working now with giga-sized databases, its the time to rewrite this module. So what is planned ? Duplicator will be made on top of PHPBU in the hope to provide to the community a professional focused backup service for your websites. More information : Future requirement: PHP 7.x.x The official repo : https://github.com/sebastianfeldmann/phpbu Any suggestion welcome. Have a nice day ! ✌️
  17. I don't know which version you are using, but it already work out of the box... you do not need to hack something to get it working. It already check if the post var from step 1 is an email, if not, it check against username. https://github.com/processwire/processwire/blob/dev/wire/modules/Process/ProcessForgotPassword.module#L234 In ProcessForgotPassword 1.0.3, you can configure it :
  18. You need to use Application Pool Identities. Those permissions need to be granted to the user that is set to be the Identity of the application pool in IIS. If you are lost with this feature then ask your sys admin to setup it or get back to us and I will try to give you some steps for setting up this account...
  19. It work, just test it. The only thing which could confuse the user, its the phrase, maybe its possible to hook into the ForgotPassword module to change that. Otherwise everything is fine.
  20. Hi @suntrop by default you have to enter an username, not an email , and this user/email should exist in the system ?
  21. At this moment, you should upgrade the module by downloading it directly from Github then install GeneralSettings.module and ProcessGeneralSettings.module
  22. Then with a hook, you can remove them, look : On a module : $this->addHookAfter('LoginRegister::buildProfileForm', $this, 'renderProfileForm'); protected function renderProfileForm($event) { $form = $event->return; foreach ($form->children as $field) { if ($field instanceof InputfieldEmail || $field instanceof InputfieldPassword) { $form->remove($field); } } } or in ready.php : wire()->addHookAfter('LoginRegister::buildProfileForm', function($event) { $form = $event->return; foreach ($form->children as $field) { if ($field instanceof InputfieldEmail || $field instanceof InputfieldPassword) { $form->remove($field); } } });
  23. I think I didn't understood all the problem here but I am trying to answer anyway ? From what I understand, you are trying to update the page JohnDoe (a page under Employees parent which act as a profile page) for the user JohnDoe - correct ? My question is, why you do not use the user profile ? If your problem is the password field, you can remove it from the list of the editable fields in the LoginRegister module - as you can choose which field can be edited by the user.
  24. You should share your custom module code to get better support @MarcoPLY
×
×
  • Create New...