• Resolved bohcurtis

    (@bohcurtis)


    As you can see, the header of the spreadsheet is showing the first three rows instead of only the first row. I tried manually setting header_rows to 1. This is also an issue on many other pages, not just on this one page. Any suggestions are welcome.

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

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

    (@meitar)

    As you can see, the header of the spreadsheet is showing the first three rows instead of only the first row.

    That simply isn’t true; the HTML source of the page you linked shows the following for the <thead> element of the table:

    <thead>
        <tr id="igsv-1bPJak06G00iD6sycGE-3G9ojwGGyTU1w3bXOc75ouTI-row-1" class="row-1 odd">
            <th class="col-1 odd"><div>Last Name Abbott Adams</div></th>
            <th class="col-2 even"><div>First Name Nathan Rebecca</div></th>
            <th class="col-3 odd"><div>Position Custodian Grade 4 Teacher</div></th>
            <th class="col-4 even"><div>Email Address [email protected] [email protected]</div></th>
        </tr>
    </thead>
    

    As you can see, there is only one <tr></tr> (“table row”) element in the <thead></thead> (“table header”) element.

    As is stated numerous times on this support forum, the visual appearance of the table is up to your WordPress Theme. The plugin is correctly producing only one table row in the header in its output. If it looks like there are more rows in the header, that’s a sign that your Theme (or some other code on your site) is doing what you told it to do, but not what you meant for it to do. And since that’s a mismatch in something I can’t fix, I don’t (and won’t) try.

    Plugin Author Meitar

    (@meitar)

    Ah, hang on, I see now that I misunderstood your original issue: the data in the header cells are the data in the first three rows of the Google Sheet.

    That is…definitely bizarre. Unfortunately, I can’t replicate the issue. A shortcode like this:

    [gdoc key="https://docs.google.com/spreadsheets/d/1bPJak06G00iD6sycGE-3G9ojwGGyTU1w3bXOc75ouTI/edit"]
    

    works exactly as intended in my test environment; the name “Abott Adams” (for example) appears as the second row, beneath the “Last Name” and “First Name” column headings. To me, this still indicates something awry in your WordPress environment, though possibly (probably?) not something related to visual styling.

    Unfortunately, this is also not something I offer support for. Your WordPress environment is your own responsibility. If it works in my test environments (and there are many), then the issue is not with this plugin, as is evidenced by the fact that this symptom is only experienced by a small subset of users (whose WordPress sites, I must assume, are somehow broken).

    Thread Starter bohcurtis

    (@bohcurtis)

    On a separate testing server, I was able to have it work with the code you gave.
    However, using the code from the main server, it gives the same issue. Can you see any issues with the code used?
    [gdoc key="https://docs.google.com/spreadsheets/d/1bPJak06G00iD6sycGE-3G9ojwGGyTU1w3bXOc75ouTI/edit" datatables_page_length="100" query="select A,B,C,D where E contains 'MVE' " http_opts='{}']

    Plugin Author Meitar

    (@meitar)

    Can you see any issues with the code used?

    No. Your shortcode looks fine.

    Try unfreezing the frozen first row from your Google Sheet. I seem to vaguely recall some weird bug in Google where it munged rows together if there is a frozen row or column in a sheet and the data is accessed with a query, though I might be misremembering that.

    In any event, you can confirm the plugin is working as expected by accessing the data via its Google URL endpoint manually:

    https://docs.google.com/spreadsheets/d/1bPJak06G00iD6sycGE-3G9ojwGGyTU1w3bXOc75ouTI/gviz/tq?tqx=out:csv&tq=select%20A%2CB%2CC%2CD%20where%20E%20contains%20’MVE&#8217;

    As you can see, Google returns the data you see in your table, i.e., it is Google, not this plugin, that is placing the later rows into the first one. You could raise an issue with Google if you want, but this plugin is working as expected.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Header Issues’ is closed to new replies.