Jump to content

martind

Members
  • Content Count

    77
  • Joined

  • Last visited

Community Reputation

11 Good

About martind

  • Rank
    Distinguished Member

Contact Methods

  • Website URL
    http://www.art-house.at

Profile Information

  • Gender
    Male
  • Location
    Austria

Recent Profile Visitors

3,357 profile views
  1. Robin, you're my hero. this works definitely out of the box. thank you.
  2. 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
  3. hi, is it possible to change field parent_id from InputfieldPageListSelect to InputfieldPageAutocomplet by addHookAfter('ProcessPageEdit::buildFormContent')? thanks, martin
  4. 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.
  5. 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
  6. 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
  7. 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.
  8. damn, you are right wanze. thank you.
  9. 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
  10. 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
  11. ok, seems to be ok with actual master 3.0.42
  12. 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?
  13. 2 years later very useful again .... thank you wanze!
  14. 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 .
×
×
  • Create New...