• Hi. I installed the plugin on a test server and it worked great but when I install it on the final server it does not create the view in the database.

    Somebody could help me? What could it be?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Aurovrata Venet

    (@aurovrata)

    Hello,

    I don’t understand what you mean by,

    it does not create the view in the database

    the plugin does 2 things,

    • tag post in child-sites to makes them network-side posts
    • custom order these post to display them in the front-end

    When you say ‘view in the database` are you talking about the MySQL DB or the 2nd point above?

    Thread Starter dcopetti

    (@dcopetti)

    Hello. Sorry for the misunderstanding.

    I mean creating a “view” in MySQL. I checked the database of my wordpress installation and no “view” was created.

    If you can pass me the statement to manually create the “view” in MySQL I would appreciate it.

    My english is bad

    I leave the text in Spanish:

    Hola. Perdón por el malentendido.

    Me refiero a la creación de una “vista” en MySQL. Revisé la base de datos de mi instalación wordpress y no se ha creado ninguna “vista”.

    Si puede pasarme la sentencia para crear manualmente la “vista” en MySQL se lo agradecería.

    Plugin Author Aurovrata Venet

    (@aurovrata)

    Ah, now I understand, sorry I was travelling these last few days and could not reply.

    If your view is not created then it is likely due to database user rights. You need to ensure your database user with which WordPress connects has the CREATE VIEW privilege.

    Unfortunately I cannot give your the SQL query because it depends on your network installation.

    You can get a print of the SQL query generated by the code to your log file by uncommenting lines 117 and 129 in the file admin/class-network-wide-posts-terms.php. You will need to enable the debug mode in your wp-config.php file on your remote server,

    
    define('WP_DEBUG', true);
     if ( WP_DEBUG ) {
         define( 'WP_DEBUG_LOG', true );
         define( 'WP_DEBUG_DISPLAY', false );
    }
    
    Thread Starter dcopetti

    (@dcopetti)

    No problem!. I have resolved the “views” of the database. It was a UTF-8 encoding problem.

    Now, the problem is that calling the function get_network_wide_posts in the index of my theme and show the latest posts causes errors in the other query or loops.

    Image:

    In spanish:
    No hay problema. He resuelto las “vistas” de la base de datos. Era un problema de codificación UTF-8.

    Ahora, el problema es que al llamar la funcion get_network_wide_posts en el index de mi theme y mostrar los últimos posts provoca errores en los demás query o loops.

    Plugin Author Aurovrata Venet

    (@aurovrata)

    Ok, glad you have resolved the views issues.

    what are the errors you are getting?

    Thread Starter dcopetti

    (@dcopetti)

    When I put the code that you have given as an instruction, leave the index empty as seen in the image. It does not show the other loop with the main site content.

    Code used:

    $nwposts = array();
    if(function_exists('get_network_wide_posts')){
      $nwposts = get_network_wide_posts();
      foreach($nwposts as $post){...
Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Database connection’ is closed to new replies.