Support » Plugin: WP Data Access » Changing Some Default Text

  • Resolved Rich

    (@rpm765)


    When loading a large table, the word “Processing…” appears while the table loads.

    Can this text be changed? If so, how?

    • This topic was modified 1 year, 3 months ago by Rich.

    The page I need help with: [log in to see the link]

Viewing 15 replies - 1 through 15 (of 20 total)
  • Yup. There many strings you can change. They are shown here.
    https://datatables.net/reference/option/language

    You can set them in publications Advanced options. Here’s an example from one of my publications

    	"language": {
    		 "infoFiltered": "",
    		 "loadingRecords" : "Loading page....",
    		 "processing": "Processing... This could take a while.",
    		 "infoEmpty": "Select a search value first.",
    		 "zeroRecords" :"No records to display. Modify or define search value(s)."
    	 }
    
    Thread Starter Rich

    (@rpm765)

    Thank you, Charles!

    I entered this into the Advanced Options:

    {
        “loadingRecords”: “Loading the Diary Entries…”,
        “processing”: “Loading the Diary Entries…”
    }

    When the page loads, it still says just “Processing…”

    If I add the word “language”: before the code as you did, I get a “Parse error on Line 1” error message.

    Thread Starter Rich

    (@rpm765)

    UPDATE:

    I discovered my error related to the word “language” and fixed it. My code now reads:

    {
      “language”: {
         “processing”: “Loading the Diary Entries”,
    “loadingRecords”: “Loading the Diary Entries”
      }
    }

    However, the problem persists. When the page loads, it still says just “Processing…”

    Everything I included in the first email should be inside the outer braces.

    try this. I deleted one nest of brackets

    
      “language”: {
         “processing”: “Loading the Diary Entries”,
    “loadingRecords”: “Loading the Diary Entries”
      }
    
    Thread Starter Rich

    (@rpm765)

    Thanks again, Charles.

    If I use the code as you show in the previous post, I get the “Parse error on Line 1” error message. I have to add an initial bracket on the first line to clear that error, like this:

    {
    “language”: {
    “processing”: “Loading the Diary Entries”,
    “loadingRecords”: “Loading the Diary Entries”
    }

    This code shows no errors, however it still doesn’t work. When the page loads, it still says just “Processing…”

    Plugin Author Passionate Programmer Peter

    (@peterschulznl)

    Are those double quotes causing a parse error? Please copy the code below into your advanced settings without any modifications:

    {
    	"language": {
    		"processing: "Loading the Diary Entries",
    		"loadingRecords": "Loading the Diary Entries"
    	}
    }

    Does it work?

    BTW, after the next update you don’t need it anymore. The next release contains a kind of spinner… 😉

    Thread Starter Rich

    (@rpm765)

    Peter, your code didn’t work either. I got an error on the “processing….” line.

    I think it’s missing a quote after “processing.”

    The spinner will be nice, but I would still prefer to show a more personalized message specific to the site.

    Plugin Author Passionate Programmer Peter

    (@peterschulznl)

    Hi Rich,

    Can you please update to 5.2.9? That seems to solve the issue. Does it work for you as well?

    Thanks,
    Peter

    Thread Starter Rich

    (@rpm765)

    Thanks for the quick response here, Peter.

    I just updated to 5.2.9, and the problem remains, with a twist. Now when a page is loading, something new shows on the screen. I cannot attach an image here, so CLICK HERE to see a screen grab. The words “Loading” and “Processing” both appear on top of each other.

    The json code I am using in the “Advanced” section of the Premium Data Publisher is:

    {
      “language”: {
         “processing”: “Loading the Diary Entries”,
    “loadingRecords”: “”
    }
    }

    • This reply was modified 1 year, 2 months ago by Rich.
    Plugin Author Passionate Programmer Peter

    (@peterschulznl)

    Rich, can you share a public url where we can see this in action?

    Thanks,
    Peter

    Thread Starter Rich

    (@rpm765)

    Yessir, I sure can.

    https://rpmelvin.com/diary-1866/

    Choosing any of the diary pages will show this for a moment as the data is pulled fro the database.

    Plugin Author Passionate Programmer Peter

    (@peterschulznl)

    Hi Rich,

    Thank you for the link!

    We’ve analyzed your webpage. When you open the image below, you’ll see that the loading message comes from another plugin.

    https://ibb.co/jR7471S

    You can also see that WP Data Access shows its standard message. This means that the language options is not taken into account. I presume it is still there?

    The most common reason is that the advanced options field contains an invalid JSON string. The JSON must be valid. If it is not, it cannot be used and will be skipped.

    Now I presume you still have the language option I gave you and I see now that I gave you an invalid JSON! 🙈 So sorry for being so stupid!

    You are probably seeing this:
    https://ibb.co/P5hVT9p

    The parse error means that the JSON is invalid and won’t be taken into account. here is the correct JSON:
    https://ibb.co/CmtcPnR

    This option does not return a parse error and will change your language setting as expected. Please bear in mind that you must solve the parse error at any time to allow the plugin to use your advanced options.

    Can you please try to update your language option with this new info? For the loading message you need to contact the developers of the other plugin.

    Sorry for the inconvenience Rich,
    Peter

    Thread Starter Rich

    (@rpm765)

    We’ve analyzed your webpage. When you open the image below, you’ll see that the loading message comes from another plugin.

    I don’t know how to override that. I cannot find that code in the plug-in editor.

    <snip>

    You can also see that WP Data Access shows its standard message. This means that the language options is not taken into account. I presume it is still there?`</blockquote>
    <strong>Yes, the correct JSON is in the site like this:</strong>

    {
      "language": {
         "processing": "Loading the Diary Entries",
         "loadingRecords": "Loading the Diary Entries"
      }
    }

    There was no change when I corrected the JSON in “Advanced” section of the Premium Data Publisher. I still see the words “Loading…” and “Processing…” overlaid one on top of the other as the table loads.

    • This reply was modified 1 year, 2 months ago by Rich.
    • This reply was modified 1 year, 2 months ago by Rich.
    Plugin Author Passionate Programmer Peter

    (@peterschulznl)

    Hi Rich,

    The loading message is generated by your virtue plugin. See this screenshot:
    https://imgbb.com/jR7471S

    Can you share a screenshot of your advanced settings?

    Thanks,
    Peter

    Thread Starter Rich

    (@rpm765)

    I understand that the “Loading…” message I see is coming from my Virtue Theme. However, I can’t find that line of code in the theme editor to change or disable it. I use a Child Theme on this site, but I don’t know enough about altering or adding things to a Child Theme to try and fix or change this.

    Here are screen shots of all the publication settings.

    • Publication Data
    • Publication Type
    • Publication Styling
      This section also has me a bit confused. I built a style called “Diary Master” and it IS being used on the site. It is what provides the dark blue header and footer, the white font in the header and footer and the rounded corners. However, that is not what is shown here.
    • Premium Extensions – Nothing entered in this section
    • Advanced Settings

    Thanks for going the extra mile with me here, Peter.

    • This reply was modified 1 year, 2 months ago by Rich.
    • This reply was modified 1 year, 2 months ago by Rich.
Viewing 15 replies - 1 through 15 (of 20 total)
  • The topic ‘Changing Some Default Text’ is closed to new replies.