• Resolved Tim Thee

    (@timotheebesse)


    Hello,

    Thank you for your plugin,

    Since the last update (today) I get an error instead a table : Fatal error: Cannot use string offset as an array in (…)/wp-content/plugins/inline-google-spreadsheet-viewer/inline-gdocs-viewer.php on line 441

    It’s the only table that causes the error, but I can’t find why. It’s the only one displayed with “gid”, the others use the query function.

    What’s odd is that the error doesn’t show when I put the shortcode and preview the page, only when I save the changes !

    On the other tables I can’t fix the first columns but it may be because they’re in a spoiler shortcode from the shortcode ultimate plugin…

    Thanks for your help !

    https://www.ads-software.com/plugins/inline-google-spreadsheet-viewer/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Meitar

    (@meitar)

    Huh. Only that one table?

    Would you mind sharing the key and, if you’re using one, the query you’re using in that specific shortcode so I can have a look at the table contents, too?

    Thanks. ??

    Thread Starter Tim Thee

    (@timotheebesse)

    Here is the shortcode (no query) :

    [gdoc key=”https://docs.google.com/spreadsheets/d/1tatc0EBIpXgBzEFwakzqYCcbO7d6v0r7K9Cua2KVYek/edit” gid=”2099403487″ title=”Comptages de l’année en cours” class=”FixedColumns-left-1 no-datatables” header_rows=”1″]

    Thanks !

    Plugin Author Meitar

    (@meitar)

    Oh, interesting. I’m not sure why, but it seems Google is returning an HTTP response with a filename that breaks WordPress’s built-in serialization routines. This means the cache can not finish writing the complete serialized data value, and so when you go to load it from the cache there’s an unserialization error.

    I’ve worked around this problem, and fixed a few other bugs, in the latest version 0.8.1, released a few seconds ago.

    Let me know if this doesn’t solve the problem for you. ??

    Also, the reason you’re not seeing the left column frozen is because you’ve included no-datatables in your class attribute. That will override FixedColumns-left-1 because fixed columns needs DataTables JavaScript to work, and the no-datatables class disables DataTables’s JavaScript.

    Finally, header_rows="1" is the default, so you can omit that attribute altogether and you’ll still end up seeing a table with 1 header row. ??

    Thread Starter Tim Thee

    (@timotheebesse)

    It does work now whith the update, great !

    Thanks a lot !

    I did figure out that “no-datatables” removed the possibility to fix columns, but I forgot then, and the code stayed in a copy/paste done too quickly.

    But in other pages it’s the FixedColumns that doesn’t work, I think it’s because they are included in a spoiler shortcode from Shortcode Ultimate plugin. Example in the sandbox here : https://www.logrami.fr/sandbox/

    It may be a jquery bug from the SU plugin, but in case you understand what’s going on…

    [gdoc key="https://docs.google.com/spreadsheets/d/1tatc0EBIpXgBzEFwakzqYCcbO7d6v0r7K9Cua2KVYek/edit" query="Select B,C,F,G,H,I,J,K,L,M,P,R,T,U,V,W,AC,AF,AG,AH,AI WHERE A ='Chatellerault' ORDER BY B?asc" class="FixedColumns-left-2"]

    Thanks again for your work !

    Plugin Author Meitar

    (@meitar)

    Hey Tim, it does seem to be a JavaScript incompatibility, because without the SU plugin you mentioned, the freeze works fine. I took a brief look at the SU plugin, too, but honestly it looked kinda messy and it seems to be packaging a bunch of shortcodes available elsewhere (along with some nag and adware?!?!) into one plugin, which seems kind of unscrupulous to me. So, I didn’t do any further digging into the incompatibility.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Fatal Error on loading table’ is closed to new replies.