WordPress.org

Forums

dbview
[resolved] Table does not appear in the post (23 posts)

  1. pfmcorreia
    Member
    Posted 2 years ago #

    Hello,

    I made a query and recorded a view, put the shortcode in a post and the table does not appear... When I see the page only appears the message "0 errors" where the table should appear.
    Am I doing something wrong?

    http://wordpress.org/extend/plugins/dbview/

  2. pfmcorreia
    Member
    Posted 2 years ago #

    The view has been marked as public.

  3. john ackers
    Member
    Plugin Author

    Posted 2 years ago #

    Hmm, presumably the table appears correctly in the dashboard? Have you tried inspecting the element in the browser to check that the table isn't hidden e.g. by style sheet. Is the table present but has zero rows? Have you tried a simple query which returns just 1 row and 1 column?

  4. pfmcorreia
    Member
    Posted 2 years ago #

    Yes, in dashboard, the table appears correctly.
    I inspect the element and I don't see anything strange. The table isnt present, and I tryed a simple query which returns just 1 row and 1 column.

    I made a new wordpress install with the same theme and the same plugins, and your plugin works fine... I dont understand what's wrong...

  5. john ackers
    Member
    Plugin Author

    Posted 2 years ago #

    OK, that's helpful. I haven't seen this before. Sorry you are having this problem. Could you look at the two apache transfer logs. There should be (an ajax) request for the data and the response. They should be identical for both old and new installs. Thanks.

  6. pfmcorreia
    Member
    Posted 2 years ago #

    Thank you by your suport :-)

    'll have to apologize for my lack of knowledge ... but where can I find these log's?

  7. john ackers
    Member
    Plugin Author

    Posted 2 years ago #

    Default location is /var/log/apache2/access.log on a linux server running apache2. It shows each URL request and the size of each response. Sorry I don't know where the logs are on your box. This might help you find them. http://php.net/manual/en/function.phpinfo.php

  8. pfmcorreia
    Member
    Posted 2 years ago #

    Ok, I think I find the Apache log

    WordPress install were dbview not show the table:
    ((ip)) domain.com - [10/Oct/2012:02:12:44 +0200] "GET /formacao/wp-admin/admin-ajax.php?action=dbview&verb=autoLoad&name=nova&pageSize=10 HTTP/1.1" 200 2783 "http://formacao.domain.com/empresas/" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.4 (KHTML, like Gecko) Chrome/22.0.1229.92 Safari/537.4"

    WordPress install were dbview show the table:
    ((ip)) domain.com - [10/Oct/2012:03:08:57 +0200] "GET /teste/wp-admin/admin-ajax.php?action=dbview&verb=autoLoad&name=lista&pageSize=10 HTTP/1.1" 200 1975 "http://domain.com/teste/lista-de-posts/" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.4 (KHTML, like Gecko) Chrome/22.0.1229.92 Safari/537.4"

  9. john ackers
    Member
    Plugin Author

    Posted 2 years ago #

    That's it and quite interesting. From my reading of the log, 2783 bytes are being returned to the browser. It doesn't ring any bells. I don't know what to suggest next. But I'd be tempted to put a breakpoint in the browser (i could give you line number) and dump the data into a file. It could be a stack dump but they are normally displayed. Long shot, if you can make your webserver port public temporarily, I could do it.

  10. john ackers
    Member
    Plugin Author

    Posted 2 years ago #

    Have you checked your browser error log? Errors are quite often hidden.

  11. pfmcorreia
    Member
    Posted 2 years ago #

  12. john ackers
    Member
    Plugin Author

    Posted 2 years ago #

    OK on Chrome i get this on the error console:

    XMLHttpRequest cannot load http://ficriativa.com/formacao/wp-admin/admin-ajax.php?action=dbview&verb=autoLoad&name=teste_novo&pageSize=10. Origin http://formacao.ficriativa.com is not allowed by Access-Control-Allow-Origin.

    I haven't looked this up but will tomorrow.

  13. pfmcorreia
    Member
    Posted 2 years ago #

    When I inspect the page (chrome > inspect), in console show the following error:

    XMLHttpRequest cannot load http://ficriativa.com/formacao/wp-admin/admin-ajax.php?action=dbview&verb=autoLoad&name=teste_novo&pageSize=10. Origin http://formacao.ficriativa.com is not allowed by Access-Control-Allow-Origin.

  14. pfmcorreia
    Member
    Posted 2 years ago #

    OK
    thanks again

  15. john ackers
    Member
    Plugin Author

    Posted 2 years ago #

    Is the 'WordPress Address (URL)' set to http://formacao.ficriativa.com. The underlying problem relates to the subdomain.

  16. pfmcorreia
    Member
    Posted 2 years ago #

    The wordpress address is set to http://formacao.ficriativa.com and the site address is set to http://ficriativa.com/formacao

    I changed the wordpress address (and the .htaccess file) on my test site and the same problem occurred.

  17. john ackers
    Member
    Plugin Author

    Posted 2 years ago #

    Ok. I will test functionality with sub domains tomorrow. It should be easy to resolve/fix. Sorry in advance if the bug is mine.

  18. pfmcorreia
    Member
    Posted 2 years ago #

    Thanks again for the interest and availability.
    I hope my basic user issues have contributed to the improvement of the plugin

  19. john ackers
    Member
    Plugin Author

    Posted 2 years ago #

    The wordpress address is set to http://formacao.ficriativa.com and the site address is set to http://ficriativa.com/formacao

    Is it possible that the wordpress address and site address are set the wrong way around?

  20. pfmcorreia
    Member
    Posted 2 years ago #

    Sorry. I wrote here the wrong way.
    Wordpress address: http://ficriativa.com/formacao
    Site address: http://formacao.ficriativa.com

  21. john ackers
    Member
    Plugin Author

    Posted 2 years ago #

    I have tried plugin operation with a subdomain and it works for me. But my wordpress and site address are the same.

    I think you need to set site address to be the same as the wordpress address, or set it to a directory underneath the wordpress address as per http://codex.wordpress.org/Settings_General_Screen

    You are introducing a 'new' URL http://ficriativa.com/formacao which I think is causing the cross domain security error.

    Please let me know if this works!

  22. pfmcorreia
    Member
    Posted 2 years ago #

    I apologize for wasting your time with my mistake.
    I changed the site settings base URL and all works fine.
    Thanks for your great support.

  23. john ackers
    Member
    Plugin Author

    Posted 2 years ago #

    I am very pleased it works.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • dbview
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags

No tags yet.