Skip to content
This repository was archived by the owner on Oct 21, 2019. It is now read-only.

Incompatibility with Insert PHP plugin #25

Open
edgarbar2 opened this issue Aug 8, 2018 · 4 comments
Open

Incompatibility with Insert PHP plugin #25

edgarbar2 opened this issue Aug 8, 2018 · 4 comments

Comments

@edgarbar2
Copy link

I have a site where I use Pods (https://wordpress.org/plugins/pods/) that up to now works perfectly with Gutenberg and some pages programming in php, for this I use the Insert PHP plugin (https: //wordpress.org/plugins/insert-php/).
I had to disable Gutenberg because those pages using Insert PHP stopped working. They show nothing without reporting any error.

@danielbachhuber
Copy link
Owner

Hi @edgarbar2,

Thanks for the report.

I had to disable Gutenberg because those pages using Insert PHP stopped working. They show nothing without reporting any error.

Can you describe in greater detail what you mean by "stopped working"? Do you mean that Gutenberg wouldn't load, the frontend page wouldn't load, or both? And by "show nothing", do you mean that you get an entirely blank page or something else?

@edgarbar2
Copy link
Author

When active Gutenberg, in back-end interface the page is all right, the code is load in a block.
The error is in the execute frontend the page show only the header, menus, footer and another additional content, but not show the content area, the block is empty.

@danielbachhuber
Copy link
Owner

The error is in the execute frontend the page show only the header, menus, footer and another additional content, but not show the content area, the block is empty.

Can you share a screenshot of this? As well as the content you have in the editor?

@edgarbar2
Copy link
Author

With the Gutenberg plugin active:
screencapture-resistencia-gob-ar-municipio-boletines-oficiales-2018-08-22-14_06_24

With With the Gutenberg plugin inactive:
screencapture-resistencia-gob-ar-municipio-boletines-oficiales-2018-08-22-14_26_05

This is the code:
`[insert_php]
/* >>>css<<< */
echo '

<style> select {background: white; color: black; } .spoi {padding-left: 20px; padding-right: 20px;} </style>

';

/* >>>carga de los pods Norma Legal<<< */
$bo = pods( 'boletnoficial' );

/* >>> contrucción del formulario <<< */;
echo '[su_box title="Filtro para Boletines Oficiales" box_color="#813788" radius="0"]

';

echo '

';

/* >>generación y carga de los valores de Tipo de Norma Legal en un Select<< */;
echo '[su_row][su_column size="1/4"]Boletines Oficiales: [/su_column]';
echo '[su_column size="3/4"]'; echo ' ►►Todos los Boletines◄◄'; $params = array ('limit' => -1 , orderby=>'bole_fecha DESC' ); $bo->find( $params ); while ( $bo->fetch() ) { if ( $_POST['boletin_oficial'] <> "" and $bo->field( 'bolenumero' ) == $_POST['boletin_oficial'] ) { echo ' ' ; } else { echo ' '; }; echo 'BOLETIN Nº '.$bo->field( 'bolenumero' ).' - Fecha de Publicación '.date_i18n("d", strtotime($bo->field( 'bole_fecha' ))).'/'.date_i18n("m", strtotime($bo->field( 'bole_fecha' ))).'/'.date_i18n("Y", strtotime($bo->field( 'bole_fecha' ))).''; } echo '[/su_column] [/su_row]';

echo '

'

/* >>botón<< */;
echo '

'; echo ' [/su_box]';

/* ******************************************* /
/
>>>búsqueda<<< */;
$bus = 't.post_status IN ("publish")';
$bus .= ( $_POST['boletin_oficial'] <> "" ) ? ' and bolenumero.meta_value ="'. $_POST['boletin_oficial'].'"' : "";
$orden = 'bole_fecha DESC';
$params = array ( 'limit' => 10 , 'where'=> $bus, 'orderby'=> $orden); $bo->find($params);
echo '

Se han encontrado '.$bo->total_found().' Boletines Oficiales

'; while ( $bo->fetch() ) {

echo '

BOLETÍN Nº '.$bo->display ( 'bolenumero' ).' - Fecha de Publicación '.date_i18n("d", strtotime($bo->field( 'bole_fecha' ))).'/'.date_i18n("m", strtotime($bo->field( 'bole_fecha' ))).'/'.date_i18n("Y", strtotime($bo->field( 'bole_fecha' ))).'

';
echo '

'; echo '[su_spoiler title="Normas Legales del Boletín Oficial Nº '.$bo->display ( 'bolenumero' ).' " style="fancy" icon="arrow-circle-1"]'; $ids = "'".$bo->field( 'ID' )."'"; echo '[pods name="normalegal" orderby="tipo_documento.orden_de_publicacion.meta_value, numero.meta_value" where="boletn_oficial.ID='.$ids.'" limit="-1" template="BO NL"]'; echo '[/su_spoiler]'; echo '
';

}

echo $bo->pagination( array( 'type' => 'advanced' ) );
[/insert_php]`

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants