Jump to content

PWaddict

Members
  • Posts

    908
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by PWaddict

  1. It's buggy not only on page fields. Well, I go to the columns to set the fields and I'm getting the results instantly on lister. Then I save the bookmark. If I visit the bookmark, the last 2 columns fields (page fields) are not displayed in the lister. They're missing from columns too even though the bookmark string I saved on Bookmarks is correct.

    I re-added those 2 page fields in columns but this time I changed their position and saved the bookmark. Now when I visit the bookmark, the 2 page fields are displayed on the lister but the last one field (options field) is missing.

  2. 5 minutes ago, Marco Ro said:

    I had a problem with the sitemap generated because Google, or a check tools, tell me that the page was an HTML code. And if I inspect the page it is actually encoded as an html page.

    I'm using the CSS option on few sites without a problem on Google. 

  3. On October 2020 the table pages was crashed and now I just noticed on the logs that at least 1 month ago also a field table crashed. I have never see that notice on frontend otherwise I would have instantly switched to a previous db backup. Now that I noticed this issue by randomly going to logs I don't have any proper db backup as all of them are with that field crashed ?

    SQLSTATE[HY000]: General error: 1194 Table 'field_faq_answer' is marked as crashed and should be repaired (in C:\laragon\www\mysite\wire\core\WireDatabasePDOStatement.php line 166)

     

  4. 35 minutes ago, adrian said:

    @PWaddict - I am not having any problems deleting a rule. Can you please investigate the error further - is it specific to a particular browser? Are you running the regular Uikit theme? Can you try debugging the deleteRow function in the module's js file to see if you can prevent the error?

    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
    

     

    • Like 1
  5. 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)

     

  6. 45 minutes ago, adrian said:

    Looks like they finally shutdown access via http://youtube.com/get_video_info?video_id= which means I'll need to change this module to use their API which means you'll need to get an API key to make it work.

    Any chance you have time to make that change to the module and submit a PR?

    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.

    • Like 2
  7. 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????????

  8. 3 minutes ago, dragan said:

    @PWaddict Did you mean to post this question in the FormBuilder (pro) forum?

     

    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)
    		);

     

  9. 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').

×
×
  • Create New...