Git Product home page Git Product logo

Comments (15)

samwilson avatar samwilson commented on September 23, 2024

There's a forum at https://wordpress.org/support/plugin/tabulate but here on Github is a good place to post things as well.

The date format is defined by the date_format core WordPress option, so you can't change it just for Tabulate I'm afraid but you can change it.

Reports certainly can allow you to display whatever HTML (or other output) you like. Sorry it's not activating itself properly! I assume there's no error when you activate? And there's no tabulate_reports table visible anywhere? It's supposed to create two tables for reports, one 'reports' and one 'reports_sources'.

There's a plugin called debug-plugin-activation-errors that could be of help in tracking down the cause here (although, perhaps not super useful if there's no error actually occurring!).

I'll have a look and see what could be causing this.

from tabulate.

ArcherData avatar ArcherData commented on September 23, 2024

Hi Sam,

Hmm. The dates in the database are stored as YYYY-MM-DD, which is nice and efficient. Since the site is for a small city, I suppose they could do with using the same format as well, at least for the time being. It would be a very nice feature enhancement, especially if there was a table-specific option to set the date associated with the table it's used with ... just a thought for Tabulate Pro?

No, there was no error during activation. The error shows when clicking on the "Reports" menu item. I did try the procedure like 3 different times ... cuz you never know. I just checked again with phpMyAdmin and 'reports' and 'reports_sources' were not created.

I will look into the suggested debug plugin and let you know if anything happens.

Thank you for your help.

Don

from tabulate.

ArcherData avatar ArcherData commented on September 23, 2024

Sam,

First, I tried the current WP plugin "Developer Tools" because it also tries to capture unexpected output. No errors upon deactivation/activation cycle.

Next, I found David Wells' debug-plugin-activation-errors on Git, removed the earlier plugins, installed David's script and activated. Repeated deactivation/activation cycle. No reported errors.

Don

from tabulate.

samwilson avatar samwilson commented on September 23, 2024

Does changing the site-wide date format work? Or do you want to keep a different format for elsewhere?

By the way, what MySQL engine are you using?

The structure of the reports table is:

CREATE TABLE IF NOT EXISTS `tabulate_reports` (
  `id` INT(4) unsigned NOT NULL AUTO_INCREMENT PRIMARY KEY,
  `title` varchar(200) NOT NULL UNIQUE,
  `description` text NOT NULL,
  `mime_type` varchar(50) NOT NULL DEFAULT 'text/html',
  `file_extension` varchar(10) DEFAULT NULL COMMENT 'If defined, this report will be downloaded.',
  `template` text NOT NULL COMMENT 'The Twig template used to display this report.'
) ENGINE=InnoDB;

Do you get any error if you try to create that manually? (Not that I'm suggesting that as a workaround, because I'd love to fix the actual problem.)

from tabulate.

ArcherData avatar ArcherData commented on September 23, 2024

See attached screenshots.
2018-07-04 07_11_09-moundvalleyks com_phpmyadmin 4 7 7
2018-07-04_db-config
2018-07-04_phpmyadmin 4 7 7_mysql-maria-error
The last one is the SQL error message. I hope this is helpful.

The software in use is included in one of the screenshots.
The site-wide date format did change it all to YYYY-MM-DD format.

from tabulate.

samwilson avatar samwilson commented on September 23, 2024

Ah! It's because you're on new MariaDB (same would apply to MySQL 5.7).

I'll get this fixed up post haste.

from tabulate.

samwilson avatar samwilson commented on September 23, 2024

Link to core comment about this: https://github.com/WordPress/WordPress/blob/2e9b08b3a26f8a069b1df94a3abcc3df05d4f360/wp-admin/includes/schema.php#L48

from tabulate.

ArcherData avatar ArcherData commented on September 23, 2024

Update received and applied. deactivated/activated and 'debuf-plugin-activation-errors' reported:
The Issues Causing "unexpected output" are:

WordPress database error: [Specified key was too long; max key length is 767 bytes]
CREATE TABLE IF NOT EXISTS wpuq_tabulate_reports (
id INT(4) unsigned NOT NULL AUTO_INCREMENT PRIMARY KEY,
title varchar(200) NOT NULL UNIQUE,
description text NOT NULL,
mime_type varchar(50) NOT NULL DEFAULT 'text/html',
file_extension varchar(10) DEFAULT NULL COMMENT 'If defined, this report will be downloaded.',
template text NOT NULL COMMENT 'The Twig template used to display this report.'
) ENGINE=InnoDB;

WordPress database error: [Can't create table mndvlyks_wp456.wpuq_tabulate_report_sources (errno: 150 "Foreign key constraint is incorrectly formed")]
CREATE TABLE IF NOT EXISTS wpuq_tabulate_report_sources (
id INT(5) unsigned NOT NULL AUTO_INCREMENT PRIMARY KEY,
report INT(4) unsigned NOT NULL,
FOREIGN KEY (report) REFERENCES wpuq_tabulate_reports (id),
name varchar(50) NOT NULL,
query text NOT NULL
) ENGINE=InnoDB;

WordPress database error: [Table 'mndvlyks_wp456.wpuq_tabulate_reports' doesn't exist]
SELECT COUNT(*) FROM wpuq_tabulate_reports

Clear Warnings and Try Plugin Install Again

I cannot tell if this is from the last attempt of this one, but it appears to me to be current.

from tabulate.

samwilson avatar samwilson commented on September 23, 2024

It's the title varchar(200) NOT NULL UNIQUE, bit that's the problem. It should be 191 rather than 200. I've prepared a new update, but it's currently failing in a weird way so I can't release it yet. I'll make it pass soon though!

Thanks for your patience. :-)

from tabulate.

ArcherData avatar ArcherData commented on September 23, 2024

I am glad to help ... and I'm learning things along the way, so it's all good.

from tabulate.

samwilson avatar samwilson commented on September 23, 2024

Right, fixed Travis' complaints, and version 2.10.3 is released — we'll see if that gets us anywhere! :)

from tabulate.

ArcherData avatar ArcherData commented on September 23, 2024

Dashboard reports:
The Issues Causing "unexpected output" are:
Activation Error Cleared. Run your plugin activation again from plugins admin page. Turn off this plugin to get rid of these messages

Deactivated ... update 2.10.3 arrived and installed.
Activated — NO ERRORS!
Debug "unexpected output" During Plugin Activation — deactivated.

Now my only problem is figuring out how to create a report for a selected table. The Reports page shows:
image

from tabulate.

samwilson avatar samwilson commented on September 23, 2024

Cool! That's good.

Okay, so I'm working on some better (i.e. any) documentation for reports...

But for now: basically, for a report you define the SQL you need to retrieve the data you need, and then the HTML (or whatever output format) you want for the output, and the two get put together.

So, what are you aiming at? e.g. if you have a table containing URLs and titles, you could create a report that lists them as an HTML list and each URL would be linked by the title.

from tabulate.

ArcherData avatar ArcherData commented on September 23, 2024

Can you embed a tool like the Tiny But Strong (http://www.tinybutstrong.com/) template engine to Tabulate?

The one thing I need to do that [tabulate table=ordinances search=yes] cannot do is create a clickable link to the PDF file stored in the table. Perhaps something like this ...
[tabulate table=ordinances search=yes linkto=link]
... where 'link' is the name of the column that is desired as a clickable link?

I converted your online documentation to a Word document that could easily be turned into a PDF, if that's something that is helpful to you. It's something I can do to assist, although your command of English is outstanding. I'm a retired computer industry wannabe geek who has written 6 screenplays, 6 books, edited 2 plays and wrote 2 seasons of a web series, plus the occasional P.R. release and produce my own documentation on key pieces of software I routinely use, since I prefer to have manuals on paper so I can make notes in them.

from tabulate.

samwilson avatar samwilson commented on September 23, 2024

The template system is a bit like TBS (although I'm not very familiar with that); the one we use is called Twig and is pretty powerful.

Thanks for your kind words about the documentation! I'm glad it's of use. And on the PDF front: Read the Docs already makes one for us! It's at https://readthedocs.org/projects/tabulate/downloads/pdf/latest/

I hope to get some work done on the reports shortcode this weekend. I do wonder about the idea of being able to specify custom formatting for individual fields (which would make e.g. turning a URL into a link pretty easy) but at the moment I think the reports route is going to be more flexible and hopefully less work (e.g. no need to have extra configuration if someone wants to set the 'target' attribute of the link, as would have to happen in the per-field template system). Anyway, I'll be sure to ask you what you think when I get something done. :-)

I'll add updates to #61.

from tabulate.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.