-
Posts
86 -
Joined
-
Last visited
Everything posted by martind
-
ok, thank you. I'll try to check this.
-
sorry. first: yes, it's the same person second: logged in user can't get the content that it should have access to. i don't think it's a problem with the module, in postman everything works finde. the session consists. But the react app seems to do here something diffrent.
-
thanks for the fast reply. i don't really have acces to the client apps code, just see my logs from graphql template. So the app makes a few queries as guest, then a login, then further queries. All queries done before the login, are further logged as guest with the old session id. All queries that havent been executed before login, are logged for the logged-in user with another session_id. So the app now has 2 clients. When quering access restricted contents it comes to problems. So, do i have a possibility on the serverside to prevent this?
-
hi dadish. i have some content queries that get executed as guest, later comes a login query. after that, the previous content queries further get executed as guest (with the old session id), where eg. the me query gives me the correct user data. so the guest session remains in place for all queries executed before login. What is the beste way to prevent this? thanks martin
-
mhm, thanks for the reply, had suspected that I would have to do it this way.
-
hi dadish, first of all thank you for this great module, very imposing. I saw the specs, the problem here is, that i have this values and have to provide it over the api for an upcoming expansion step. Isn't it possible to add such fields with a getQueryFields hook instead the modules field configuration? How do you handle such cases for existing sites and data? thank you and best wishes! martin
-
What is the best way to avoid naming conflicts when querying Option-Select Field with values starting with numbers, which breaks the Schema. This occures when adding the (options) field in the module config screen for fields to serve.
-
i also see this underscore/uppercase caused 301 redirect behavior for my urlsegment based ajax requests after ugrading from 3.0.171 to 3.0.210
- 6 replies
-
- urlsegments
- url issue
-
(and 1 more)
Tagged with:
-
Problem: Ajax -requests getting 301 redirects
martind replied to foobar123's topic in General Support
i also see this 301 redirect behavior for my ajax requests after ugrading from 3.0.171 to 3.0.210 ... move to this thread: -
thank you. the problem i see is, that $origFld = $wrap->get('parent_id'); is NULL. parent_id doesn't seem to be in $event->return maybe this has to do with my module the hook lives in? public function ready() { $this->addHookAfter('ProcessPageEdit::buildFormContent', $this, 'hookAfter_ProcessPageEdit_buildFormContent'); .... public function hookAfter_ProcessPageEdit_buildFormContent($event) { $p = $event->object->getPage(); $form = $event->return; .... $origFld = $form->get('parent_id'); // and here the NULL
-
thank you both. neither check_access=0 nor include_all=1 works here (even in the field settings, the access-toggle for api usage is set true for both, content_blocks repeater and downloads) . instead i got it working (for both, suberadmin and guest) by doing it like that (similar to Cengiz' solution from the post below): wire('pages')->find("template=basic-page, content_blocks=content_blocks.downloads.tags!='', check_access=0"); maybe this has some impact on further usage of the including function, but for this case it works. Any tips are welcome for a more certain syntax.
-
hello, i try to use a subfield-selector to find pages with tagged files (downloads) inside a repeater (content_blocks): wire('pages')->find("template=basic-page, content_blocks.downloads.tags!=''"); now, this works as expected when i'm loggedin as superuser, but not as guest. it behaves like no subfield-selector than .count is possible for loggedOut users. any idea what the problem is? ProcessWire 3.0.123 PHP Version 7.0.32 thanks, martin
-
thanks adrian, works perfect now also with pagination, even the ignore-first-row feature is working, which wasn't possible too, to get working by module-settings in version 2.0.5 great module, thank you! martin
-
hi, the file-based csv-import (both, on a fresh import or update) quits for me in case, when i set orderByCols AND a paginationLimit >0 (onyl orderByCols set without pagination limit seems to work fine) : Fatal error: Class 'TableRows' not found in /home/.sites/102/site1425/web/v17/site/assets/cache/FileCompiler/site/modules/TableCsvImportExport/TableCsvImportExport.module on line 386 i'm on 'version' => '2.0.5' pw 3.0.110 table 0.1.9 the table-field has one more col than the csv-file, if that could be the problem. But works fine for everything else but the pagination thing. thanks.
-
damn, you are right wanze. thank you.
-
to further describe this a bit. home.php $form_login = "<form id='loginForm' class='uk-form' action='/proc/login/' method='post'>\n"; $form_login .= "<fieldset data-uk-margin>\n"; $form_login .= "<legend>Login</legend> <input type='text' name='login_name' placeholder='E-Mail'> <input type='text' name='password' placeholder='password'> <input type='submit' class='uk-button' value='Login' />\n"; $form_login .= "</fieldset>\n"; $form_login .= "</form>\n"; xx.js $('#loginForm').ajaxForm({ dataType: 'json', success: processFormSuccess }); function processFormSuccess(data) { // 'data' is the json object returned from ajax.php if(data.statusCode == 2) { $('#login_content').html(data.responseText); $('#reg_login').html(data.username); $('.hide_loggedin').hide(); $('.show_loggedin').show(); }else{ $('#reg_messages').html(data.responseText).fadeIn('fast'); } } ajax.php if($input->urlSegment1 == "login"){ $r = array( "username" => "", "userid" => "", "email" => "", "responseText" => "", "einreichCode" => "", "statusCode" => 0 ); if ($input->post->login_name && $input->post->password) { $username = $input->post->login_name; $password = $input->post->password; // find user with email $ufind = $pages->get('template=user, email='.$sanitizer->email($username)); if($ufind->id) { try{ $u = $session->login($ufind->name, $password); if ($u->id) { $log->save('login', "Login by {$u->screen_name} ({$u->id})."); $r['responseText'] .= "<p>welcomoe back, {$u->screen_name}.</p>"; $r['einreichCode'] = $password; $r['email'] = $u->email; $r['userid'] = $u->id; $r['username'] = $u->screen_name; $r['statusCode'] = 2; } else { $log->save('login', "Login fault"); $r['responseText'] .= "<p>Falsche E-Mail <strong>>>{$username}<<</strong> oder Einreich-ID <strong>>>{$password}<<</strong>. Login fehlgeschlagen.<br > Versuchen Sie es erneut oder kontaktieren Sie uns unter <a href='mailto:admin@xx.net'>admin@xx.net</a></p>"; } } catch(Exception $e){ $log->save('login', $e->getMessage()); } } }else{ $log->save('login', "Fehler. Keine Login Daten."); } $response = json_encode($r); echo $response; } ... so, everything of this works as expected, the js function switches my home-site to logged-In mode, even when i directly call my pw-admin, the user is logged-in, but when reloading the home-site, it is not. Any way to effect this? thanks, martin
-
hi, i have a login form on my page which is handled within a template called by ajax. Login works fine, but only if the site doesn't get reloaded - which isn't the intention but may occur. So is there a way to manually reset the session data from within my form-handler template after successfully calling $session->login($username, $password), to have it working after a page reload? thanks, martin
-
Call to a member function ready() on a non-object
martind replied to martind's topic in General Support
ok, seems to be ok with actual master 3.0.42- 1 reply
-
- 1
-
Fatal error: Call to a member function ready() on a non-object in /.../wire/core/ProcessWire.php on line 386 the error above comes up when transfering a ProcessWire 3.0.28 Setup from dev to live host. php version is 5.5.9 cleaning up cache folder and file-compiler cache or temporary emptying the /site/modules/ folder can`t resolve the issue. Any idea?
-
2 years later very useful again .... thank you wanze!
-
me too.
-
field dependency switches uninvolved CKeditor field into rtl mode
martind replied to martind's topic in General Support
seems that field dependencies have nothing to do with this problem, narrowed it down a bit, an image field and a ckeditor- textarea in regular mode letted me reproduce this in the most simple case. workaround, user ckeditor inline-mode . -
field dependency switches uninvolved CKeditor field into rtl mode
martind replied to martind's topic in General Support
ok, i found a workaround for this. the template has two fieldsets, if the page field that gets referred from the other fields with dependencies has to be exactly between the both fieldsets, then the ckeditor field works without problems and keeps in ltr mode. page-field on any other position switches the textarea to rtl.