Jump to content

PWaddict

Members
  • Content Count

    797
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by PWaddict

  1. ProcessWire 3.0.165 (with default Uikit admin theme) Google Chrome 87.0.4280.66 (Official Build) (64-bit) I did more tests and I can only delete the last rule. So, if I want to delete the 1st or the 3rd etc, first I have set it as the last one, press the submit button to save the order list and then I can delete it. Also tested on Firefox 83.0 (64-bit) and I'm getting the following console error if I try to delete any rule except the last one: Uncaught TypeError: $(...).val() is undefined <anonymous> https://mysite.test/site/modules/ProcessCustomUploadNames/ProcessCustomUploadNames.js?v=1.2.9:68 jQuery 2 <anonymous> https://mysite.test/site/modules/ProcessCustomUploadNames/ProcessCustomUploadNames.js?v=1.2.9:59 jQuery 9 <anonymous> https://mysite.test/site/modules/ProcessCustomUploadNames/ProcessCustomUploadNames.js?v=1.2.9:54 jQuery 11
  2. Hey @adrian, it seems it's impossible to delete a rule. When I click the trash icon the rule disappears but I'm getting the following error on console and when I press the submit button the rule appears again. JqueryCore.js?v=183:2 Uncaught RangeError: Maximum call stack size exceeded at String.replace (<anonymous>) at nt (JqueryCore.js?v=183:2) at Function.nt.matches (JqueryCore.js?v=183:2) at Function.filter (JqueryCore.js?v=183:2) at init.v.fn.<computed> [as children] (JqueryCore.js?v=183:2) at Object.toggle (inputfields.js?v=31e:178) at Object.focus (inputfields.js?v=31e:400) at inputfields.js?v=31e:401 at completed (inputfields.js?v=31e:191) at Object.toggle (inputfields.js?v=31e:246)
  3. No need to change the module with the Google API keys. You can retrieve the title with oEmbed by using a url like this: http://www.youtube.com/oembed?url=http%3A//youtube.com/watch%3Fv%3DM3r2XDceM6A&format=json For more info check here.
  4. Hi @adrian the YouTube video title doesn't get saved in the description field. Vimeo is working properly. I'm using the latest version.
  5. Unfortunately no, just search what you're looking for on the Padloper forum.
  6. I guess I have to start again with a clean PW installation. The good thing is that only the "pages" table corrupted. I've exported the database so I can copy on the new installation some important text I had in some fields. The only way to prevent this from happening again is DAILY BACKUPS. Cronjob Database Backup module by @kixe seems a good choice when you're developing a site.
  7. I tried to browse the pages table in phpMyAdmin and I couldn't. It was saying that the table is still crashed so I repaired it again and now I can't even view my site. I'm getting this: Error: Exception: You do not have permission to execute this module - ProcessPageView (in C:\laragon\www\mysite\wire\core\Modules.php line 1330)
  8. I'm building a site locally on laragon and suddenly today when I visited my site at mysite.test I got error from ProcessWire: Error: Exception: SQLSTATE[HY000]: General error: 1194 Table 'pages' is marked as crashed and should be repaired (in C:\laragon\www\mysite\wire\core\WireDatabasePDOStatement.php line 166) I repaired the table "pages" on phpMyAdmin and now I can see my site but the problem is that all pages are GONE except Home. The admin section is empty too. WTF????????
  9. No, I don't have FormBuilder. I'm talking about the default ProcessWire forms on frontend. Below are the default markup & classes for the forms used by ProcessWire taken from wire/core/InputfieldWrapper.php. I can modify those with the "InputfieldWrapper::render" hook to change the form appearance but I don't know how to display form errors under inputs. $defaultMarkup = array( 'list' => "<ul {attrs}>{out}</ul>", 'item' => "<li {attrs}>{out}</li>", 'item_label' => "<label class='InputfieldHeader ui-widget-header{class}' for='{for}'>{out}</label>", 'item_label_hidden' => "<label class='InputfieldHeader InputfieldHeaderHidden ui-widget-header{class}'><span>{out}</span></label>", 'item_content' => "<div class='InputfieldContent ui-widget-content{class}'>{out}</div>", 'item_error' => "<p class='InputfieldError ui-state-error'><i class='fa fa-fw fa-flash'></i><span>{out}</span></p>", 'item_description' => "<p class='description'>{out}</p>", 'item_head' => "<h2>{out}</h2>", 'item_notes' => "<p class='notes'>{out}</p>", 'item_detail' => "<p class='detail'>{out}</p>", 'item_icon' => "<i class='fa fa-fw fa-{name}'></i> ", 'item_toggle' => "<i class='toggle-icon fa fa-fw fa-angle-down' data-to='fa-angle-down fa-angle-right'></i>", // ALSO: // InputfieldAnything => array( any of the properties above to override on a per-Inputifeld basis) ); $defaultClasses = array( 'form' => '', // additional clases for InputfieldForm (optional) 'list' => 'Inputfields', 'list_clearfix' => 'ui-helper-clearfix', 'item' => 'Inputfield {class} Inputfield_{name} ui-widget', 'item_label' => '', // additional classes for InputfieldHeader (optional) 'item_content' => '', // additional classes for InputfieldContent (optional) 'item_required' => 'InputfieldStateRequired', // class is for Inputfield 'item_error' => 'ui-state-error InputfieldStateError', // note: not the same as markup[item_error], class is for Inputfield 'item_collapsed' => 'InputfieldStateCollapsed', 'item_column_width' => 'InputfieldColumnWidth', 'item_column_width_first' => 'InputfieldColumnWidthFirst', 'item_show_if' => 'InputfieldStateShowIf', 'item_required_if' => 'InputfieldStateRequiredIf' // ALSO: // InputfieldAnything => array( any of the properties above to override on a per-Inputifeld basis) );
  10. By default on the form markup the errors are displayed under labels. Is it possible to display them under inputs without involving JavaScript?
  11. I'm using this hook to customize markup and classes on a form but it affects all forms in ProcessWire. How can I apply this to specific template only??? $wire->addHookBefore('InputfieldWrapper::render', function($event) { if($this->wire('page')->template != "checkout") return; // EDIT: Added solution $wrapper = $event->object; $defaultMarkup = array( 'list' => "<div {attrs}>{out}</div>", // etc... ); $defaultClasses = array( 'form' => 'uk-form', // etc... ); $wrapper->setMarkup($defaultMarkup); $wrapper->setClasses($defaultClasses); }); EDIT: Sorry, I forgot that I can use $this->wire('page').
  12. The reason you don't see the radio buttons is probably because you're hiding them in css or js. So check your code there carefully.
  13. Please share the code you see in the browser source for the form element.
  14. Check your css and js files in case you're hiding the radio buttons there. Can you please share the code you use to render the variations?
  15. The above hook tested on a site that has 2 languages. Maybe you have another hook that interfere. Empty your site/init.php and site/ready.php and try again.
  16. No need to use css. Check out my module for hiding pages for non-superusers.
  17. I tested this and it works: $this->pages->addHookBefore('saveReady', function($event) { $page = $event->arguments[0]; if($page->template != 'mytemplate') return; if($page->mypagefield) { $p = $page->mypagefield; $page->title = $p->title; } });
  18. I'm creating this post to help any Kaspersky Antivirus owners that will experience the following problem if their server supports HTTP/2: Trying to upload multiple images at once in ProcessWire suddenly became a nightmare. I was getting this error multiple times for some of the images: POST https://www.mysite.com/admin/page/edit/?id=10097&InputfieldFileAjax=1 net::ERR_HTTP2_PROTOCOL_ERROR and sometimes these ones too: POST https://www.mysite.com/admin/page/edit/?id=10097&InputfieldFileAjax=1 502 Uncaught SyntaxError: Unexpected token < in JSON at position 0 at JSON.parse (<anonymous>) at Function.parseJSON (JqueryCore.js?v=183:2) at XMLHttpRequest.<anonymous> (InputfieldImage.min.js?v=123-1599567437:1) Few months ago I've installed Kaspersky Security Cloud on my PC and today when I was checking the SSL certificates on my sites and on third-party sites including ProcessWire I noticed it was saying "Issued by: Kaspersky Anti-Virus Personal Root Certificate". I opened Kaspersky Security Cloud and went to Settings > Additional > Network and I selected "Do not scan encrypted connections" under "Encrypted connection scanning". By default the selected option is "Scan encrypted connections upon request from protection components". Problem solved. I can finally upload multiple images at once again and view the original issuers of the website's SSL certificates.
  19. Now, I'm getting more errors besides the one I mention above. You can delete this topic and if I can't figured out the problem I will create a new proper topic with all the details.
  20. Ok something else is going on. On localhost where PHP has max_file_uploads = 20 too (same as live server) I tried to upload 22 images at once and it worked fine. On live server when I tried to upload the same 22 images I got 13 identical errors in chrome console and 13 images stuck at "uploading" forever... Failed to load resource: net::ERR_HTTP2_PROTOCOL_ERROR
  21. It seems that setMaxFiles is actually used for the maxFiles value (Maximum files allowed) under the Details tab of the file/image field.
  22. My php default shared server settings have max_file_uploads = 20 so I would like to limit to 20 in ProcessWire too cause if I upload for example 30 images at once only the 20 will be uploaded. The other 10 will look like they're uploading forever and this is confusing for the editors. So, is it possible to limit it to 20 in ProcessWire or should I increase the number of max_file_uploads? Also, If I increase it wouldn't be bad for the server performance? Like with "setMaxFilesize" you're getting a warning on ProcessWire that you're not allowed for example to upload a file with size more than what you've set in "setMaxFilesize", I wanna do the same thing for the maximum files the editor can upload at once. I wanna let him upload max 20 and when those 20 uploaded he should be able to upload 20 max more and so on.
×
×
  • Create New...