Posts: 3,491
Threads: 106
Joined: Mar 2010
You may have a patched version of GS in your old server.
That's the normal way GS generates URLs for subpages of 'index'.
Ages ago I posted this fix. I suppose it may still work (but now it would be in line 429 or so)
http://get-simple.info/forums/showthread...6#pid14286
Posts: 1
Threads: 0
Joined: Nov 2018
Since changing to PHP-version 7.2 I get a warning:
Quote:Warning: count(): Parameter must be an array or an object that implements Countable in /getsimple/plugins/i18n_navigation/frontend.class.php on line 219
219: 'haschildren' => $showChildren ? count($children) > 0 : self::hasChildren($childurl, $show)
Installation is up-to-date. GetSimple 3.3.15, I18N Navigation 3.3.1
I can suppress the warning by adding
Code: if (version_compare(PHP_VERSION, '7.2.0', '>=')) {
error_reporting(E_ALL ^ E_WARNING);
}
Maybe you have a better idea for that.
Posts: 1,922
Threads: 87
Joined: Apr 2010
on php 7.2 warning appears
Code: <b>Warning</b>: count(): Parameter must be an array or an object that implements Countable in <b>W:\domains\000.aa\plugins\i18n_navigation\frontend.class.php</b> on line <b>219</b><br />
Posts: 3,491
Threads: 106
Joined: Mar 2010
Try changing i18n_navigation/frontend.class.php line 219
Code: 'haschildren' => $showChildren ? count($children) > 0 : self::hasChildren($childurl, $show)
to this:
Code: 'haschildren' => $showChildren ? $children && count($children) > 0 : self::hasChildren($childurl, $show)
(Not tested.)
Posts: 1,922
Threads: 87
Joined: Apr 2010
(2019-02-26, 00:52:02)Carlos Wrote: Try changing i18n_navigation/frontend.class.php line 219
Code: 'haschildren' => $showChildren ? count($children) > 0 : self::hasChildren($childurl, $show)
to this:
Code: 'haschildren' => $showChildren ? $children && count($children) > 0 : self::hasChildren($childurl, $show)
(Not tested.)
Yes it helped.
Posts: 2,928
Threads: 195
Joined: Feb 2011
I run into a problem with I18N, the admin login loads forever, the error.log grows and I get these errors:
[08-Mar-2019 15:47:01 Europe/Amsterdam] PHP Notice: Undefined index: menuStatus in /var/www/....../plugins/i18n_navigation/frontend.class.php on line 189
[08-Mar-2019 15:49:16 Europe/Amsterdam] PHP Notice: Undefined index: menuStatus in /var/www/....../plugins/i18n_navigation/frontend.class.php on line 189
I saw this here in the forum already, but could not find the answer for it.
I checked that all plugins are uptodate, it they are
I had these plugins running, but could not use the editor, no editing of existing pages
I then "downgraded" the editor to a very simple configuraiton, but to no avail, still this problem
help me out please!
Posts: 2,928
Threads: 195
Joined: Feb 2011
I still have this problem.
1) deactivated all i18Nplugins
2) deleted cache etc.
3) logged out
4) clear browser cache
5) deleted all plugins
6) log in
7) install one plugin after the other - that was my plan
as soon as I installed i18n-plugin The problem arises:
Warning: call_user_func_array() expects parameter 1 to be a valid callback, function '' not found or invalid function name in /var/www/web40/htdocs/......./admin/load.php on line 39
I NEED HELP, please help me out!
Posts: 3,491
Threads: 106
Joined: Mar 2010
Is it a new install?
If not, was it previously working properly? Was there any change in the host? Perhaps PHP was upgraded?
Posts: 2,928
Threads: 195
Joined: Feb 2011
Carlos,
history is:
I had to move 40 domains to a new server, there were 5 Getsimple installations
Each of them I installed new and then added the backupped data, themes and installed all plugins in the newest versions
I modified the ckeditor-custom-config-files etc., deactivated disfunctional CKEDITOR-plugins etc.
all these 5 websites worked in general, but I had to deacitvate / delete the plugins which are not compatible with PHP 7.xx anymore
the websites worked
in this one website I noticed that I could not edit existing pages but I could create new pages
and now I run into the problems, I don't know what my clients did, for sure they had edited something
1) when I deactivate all i18N-plugins, page-list loads, but as my theme integrates the menue-plugin, I get an error on the front page
2) I deactivated the custom-editor-file, uploaded a fresh ckeditor-directory from the install package so that no editorplugins exist anymore which could create trouble
3) I modified the gsoptions to the standard configuration, so I think the CKEDITOR is "clean"
4) I set the timeout to 300 and server times out, so I am sure it is a loop somewhere...
5) I took off the data/pages and pages.xml, and uploaded pages and pages.xml from a backup to the server
still I get these problems:
"[09-Mar-2019 11:49:49 Europe/Amsterdam] PHP Notice: Undefined index: menuStatus in /var/www/web40/htdocs/..../plugins/i18n_navigation/frontend.class.php on line 189"
and the timeout after 300 seconds
any ideas?
Posts: 515
Threads: 21
Joined: Feb 2019
2019-03-09, 21:00:12
(This post was last modified: 2019-03-09, 21:04:08 by Felix.)
Code: Warning: call_user_func_array() expects parameter 1 to be a valid callback, function '' not found or invalid function name in /var/www/web40/htdocs/......./admin/load.php on line 39
Looking at that line 39 seems you have a problem with a plugin. Did you delete it but is it still there in your calls ? Changed a name or path maybe and now it cannot be found ? Deactivate all plugins one by one and see what happens.
Posts: 2,928
Threads: 195
Joined: Feb 2011
(2019-03-09, 21:00:12)Felix Wrote: Code: Warning: call_user_func_array() expects parameter 1 to be a valid callback, function '' not found or invalid function name in /var/www/web40/htdocs/......./admin/load.php on line 39
Looking at that line 39 seems you have a problem with a plugin. Did you delete it but is it still there in your calls ? Changed a name or path maybe and now it cannot be found ? Deactivate all plugins one by one and see what happens.
well, first to identify that the problem lies in the i18n-navigation I replaced the call
PHP Code: <?php get_i18n_navigation(return_page_slug()); ?>
with
PHP Code: <?php get_navigation(get_page_slug(FALSE)); ?>
now I get a menue with all pages (which is ugly), so it must be something with the hierarchical navigation.
The page list still does not load...
I will deactivate all plugins..
Posts: 2,928
Threads: 195
Joined: Feb 2011
I disabled all plugins step by step, problem still occurs
I disable i18nplugins, problem is gone, pagelist is loading
so it is a problem with the hierarchical structure
I think I have to go through all pages and find out which one is configured in a wrong way (self parent etc)
Posts: 2,928
Threads: 195
Joined: Feb 2011
My conclusion:
I activated / deactivated ALL plugins and it is always the i18n-plugins which bring the error-notice on the front page and hinder the load of the page list.
I can work with the pages when I disable these plugins and enable them after page editing.
As this page will be closed soon, I can live with that because the frontend is ok
If only I could stop displaying the error notice on the front.end....
Posts: 57
Threads: 2
Joined: Feb 2015
2019-03-09, 22:54:40
(This post was last modified: 2019-03-09, 22:55:51 by smsHH.)
Maybe it helps if you place
Code: <?php error_reporting(0); ?>
on top of your template file. Good luck!
Posts: 2,928
Threads: 195
Joined: Feb 2011
(2019-03-09, 22:54:40)smsHH Wrote: Maybe it helps if you place
Code: <?php error_reporting(0); ?>
on top of your template file. Good luck!
thanks! I disabled the php-errors in the serverconsole... so I am "clean" for now, only to edit pages I have to disable the plugins... but on the frontend it looks ok
still this is not a satisfying situation ;=) But for now it is ok for me!
Thanks for the suggestion!
Posts: 2,928
Threads: 195
Joined: Feb 2011
well, this is such a nightmare.
To open the page list I had to deactivate the I18n-Plugin and I18nbase-plugin,
But when I try to edit a post or create a new post, an empty page with the header of the template is shown, not the edit-environment, like a blank page with header and footer
I tried everything, with activated HTML-editor and with de-activated HTML-Editpor
I really do not understand anything what is going on here. This happens to only one of 4 GS installations
and the server-health-check shows everything in green !!!!
but all content editing, page lists ... is broken except the presentation of the content on the frontend (with activated error suppression)
WTF???
Posts: 515
Threads: 21
Joined: Feb 2019
(2019-03-10, 17:29:35)Connie Wrote: well, this is such a nightmare.
To open the page list I had to deactivate the I18n-Plugin and I18nbase-plugin,
But when I try to edit a post or create a new post, an empty page with the header of the template is shown, not the edit-environment, like a blank page with header and footer
I tried everything, with activated HTML-editor and with de-activated HTML-Editpor
I really do not understand anything what is going on here. This happens to only one of 4 GS installations
and the server-health-check shows everything in green !!!!
but all content editing, page lists ... is broken except the presentation of the content on the frontend (with activated error suppression)
WTF???
This is why I have daily cron job backups of my websites.
Posts: 3,491
Threads: 106
Joined: Mar 2010
What if you enable debug mode?
Posts: 1,922
Threads: 87
Joined: Apr 2010
Code: <ul class="uk-padding uk-padding-remove-vertical uk-breadcrumb" itemscope itemtype="https://schema.org/BreadcrumbList">
<li itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">
<meta itemprop="position" content="1">
<a href="http://000.aa/" itemprop="item" uk-icon="icon: home"><span class="uk-hidden" itemprop="name">Главная</span><noscript><span itemprop="name">Home</span></noscript></a></li>
<li itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem">
<meta itemprop="position" content="2">
<a href="http://000.aa/o-sajte/" title="О сайте" itemprop="item"><span itemprop="name">О сайте<span></a></li>
<li itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem">
<meta itemprop="position" content="3">
<a href="http://000.aa/o-sajte/novosti-sajta/" title="Новости сайта" itemprop="item"><span itemprop="name">Новости сайта<span></a></li> </ul>
Google tests require bread crumbs to specify the order of the pages. Is it possible to come up with some kind of page nesting counter?
https://search.google.com/structured-data/testing-tool
Posts: 102
Threads: 7
Joined: Dec 2011
2019-04-15, 00:29:38
(This post was last modified: 2019-04-15, 00:30:14 by 0zz.)
How can I get pages' titles on other pages using components and Dynamic Pages plugin considering that it's a multi-language website?
So that I could create a "show-menu" component with a code like
<a href="<?php getPageField('slug','url'); ?>"><?php getPageField('slug','title'); ?></a>
something like <?php get_i18n_PageField('slug','title'); ?> would be great to use, but it doesn't work.
Posts: 515
Threads: 21
Joined: Feb 2019
2019-04-15, 03:58:17
(This post was last modified: 2019-04-15, 04:04:12 by Felix.)
Did you read this example ?
http://mvlcek.bplaced.net/get-simple/dynpages
Did you try this code from Oleg06 and Carlos ?
PHP Code: <?php global $parent; if ($parent) { echo '<a href="'. find_url($parent, returnPageField($parent, 'parent')). '">', returnPageField($parent, 'title'), '</a>'; } ?>
PHP Code: <?php getPageField('slug','title'); ?>
Posts: 102
Threads: 7
Joined: Dec 2011
(2019-04-15, 03:58:17)Felix Wrote: Did you read this example ?
http://mvlcek.bplaced.net/get-simple/dynpages
Did you try this code from Oleg06 and Carlos ?
I'm not sure how to use the applied code. But a good fellow offered me a universal suggestion:
PHP Code: function get_i18n_PageField($slug,$field,$language=''){ if(!$language)global $language; if(function_exists('return_i18n_languages') AND //если плагин установлен i18n in_array($language,return_i18n_languages()) AND //если язык поддерживается сайтом ($language != return_i18n_default_language())) //если это не язык по умолчанию { getPageField($slug."_".$language,$field); }else{ getPageField($slug,$field);// иначе используем встроенную ф-ю GS! } }
PHP Code: <?php get_i18n_PageField($page_slug,'title'); get_i18n_PageField($page_slug,'title','en'); getPageField($page_slug,'title'); ?>
Posts: 1,922
Threads: 87
Joined: Apr 2010
How to check whether a page is added to the menu and write a condition not to specify the page slug.
Code: <?php if (( return_page_slug() != 'novosti' ) && (return_parent(0)!='novosti')) { ?>
<?php
$bc = return_i18n_breadcrumbs(return_page_slug());
$slug = $bc[0]['url'];
$pages = return_i18n_pages();
if (@$pages[$slug]['children']) {
echo '<h3 class="uk-h4 uk-heading-divider">'.$bc[0]['menu'].'</h3>';
echo '<ul class="uk-list-divider uk-nav uk-nav-default">';
get_i18n_navigation(return_page_slug(),1,1,I18N_SHOW_MENU,'side-menu');
echo '</ul>';
}
?>
<?php } ?>
Posts: 2
Threads: 0
Joined: Apr 2019
Here http://mvlcek.bplaced.net/get-simple/i18n it says:
Quote:If you want a non-technical user to edit the content in the WYSIWYG editor, instead create multiple pages mypagename (default language) and mypagename_xx (for languages xx) with the respective contents and make sure to uncheck Add to Menu. Then include the page in the template with the following code:
Code: <?php get_i18n_content('mypagename'); ?>
While trying to understand what it means, suppose it provides an alternate way of translation using WYSIWYG editor instead of creating _xx pages.
If so, I am stuck about how to make it work.
No matter what I try nothing changes in admin, I see no additional controls to change a page body.
In the front end after I change in my default page template
Code: <?php get_page_content(); ?>
to
Code: <?php get_i18n_content(get_page_slug(FALSE)); ?>
Nothing really changes - it shows page content like before, no additional controls appeared.
Would be great if someone could point out how to use get_i18n_content().
Thanks
Posts: 1,922
Threads: 87
Joined: Apr 2010
Is there any function for the breadcrumbs counter?
<meta itemprop="position" content="1"/>
<meta itemprop="position" content="2"/>
<meta itemprop="position" content="3"/>
|