Thread Rating:
  • 3 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Support for multilanguage sites, Internationalization (I18N)
I don't think it's the root cause but:

http error log:
Code:
[Thu Oct 09 22:42:23 2014] [error] [client 79.195.81.243] PHP Warning: chmod(): Operation not permitted in /var/www/vhosts/***/httpdocs/site1/admin/template/style.php on line 65, referer: http://radioscreen.com/admin/load.php?id=i18n_base

style.php:
Code:
Line 15: $cachefile = '../../data/cache/stylesheet.txt';
Line 65: chmod($cachefile, 0644);

More important is as it seems the old upcoming error.

GS error log:
Code:
[09-Oct-2014 16:01:50 UTC] PHP Fatal error:  Maximum execution time of 60 seconds exceeded in /var/www/vhosts/***/site1/plugins/i18n_navigation/frontend.class.php on line 129

i18n navigation frontend.class.php:
Code:
Line 129: $level = (count($structure) > 0 ? $structure[count($structure)-1]['level'] + 1 : 0);
Reply
Thumbs Down 
Hello everybody,

I just have a question on the i18n_navigation plugin: I have a project holding more than 1200 content pages in three languages. When I try to resort these pages inside the "Edit navigation" area in the backend, only the first 1000 pages will be sorted.

I found out that GS / the plugin adds a new form field for every page in the tree. By sorting pages and sending the form, only the first 1000 pages are sorted correct, all exceeding pages are "ignored".

This happens due to the browser limiting forms to 1000 fields / form-submission. There seems to be no way around that, so I would like to ask if anybody of you have encountered this problem already and created a patch for it? Or do you suggest another way of sorting more than 1000 pages for an editor from the backend?

Thank you very much for your replies.
Titus
Reply
(2014-10-13, 21:58:36)titus Wrote: Hello everybody,

I just have a question on the i18n_navigation plugin: I have a project holding more than 1200 content pages in three languages. When I try to resort these pages inside the "Edit navigation" area in the backend, only the first 1000 pages will be sorted.

I found out that GS / the plugin adds a new form field for every page in the tree. By sorting pages and sending the form, only the first 1000 pages are sorted correct, all exceeding pages are "ignored".

This happens due to the browser limiting forms to 1000 fields / form-submission. There seems to be no way around that, so I would like to ask if anybody of you have encountered this problem already and created a patch for it? Or do you suggest another way of sorting more than 1000 pages for an editor from the backend?

Thank you very much for your replies.
Titus

more than 1200 pages and three languages... woow.. great job! can You show You page?
great wokrs...
user plugin: scroll to top
Reply
(2014-10-13, 22:42:04)xxdex Wrote: more than 1200 pages and three languages... woow.. great job! can You show You page?
great wokrs...

It's currently under development...it will be part of a customer information portal. But I am only the code monkey, not the content monkey ;-)
So any bananas out there for me to follow?
Reply
php max post size, I have posted it several times.
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
Hi,
I found a bug, which appears on my configuration with Nginx. In my case, $_SERVER['PHP_SELF'] is always empty, and the scriptname contained in the variable $_SERVER['SCRIPT_NAME']. So it should be corrected in function i18n_load_texts() line:
PHP Code:
    if (basename($_SERVER['PHP_SELF']) == 'index.php') { 
should be replaced by:
PHP Code:
   if (basename(empty($_SERVER['PHP_SELF']) ? $_SERVER['SCRIPT_NAME'] : $_SERVER['PHP_SELF']) == 'index.php') { 
Reply
actually you should never use PHP_SELF as it comes from the user, and "could" be used as an attack vector, also we use the function myself() all over core in 3.3.x and it uses PHP_SELF, do you have other issues?
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
I do not use, you are using, for example, in function i18n_load_texts()
Reply
I am not the developer of this plugin just adding my 2 cents , your proposed fix
"if (basename(empty($_SERVER['PHP_SELF']) ?"
just remove PHP_SELF altogether.
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
Hi everyone.
I have an odd request, maybe.

I've been using i18n plugin for my website which runs a graphic story thing. Each graphic page contains 1 custom field stuffed with pictures or code, a few more custom fields for the template, and sometimes page content field is filled with some data.
When I need to create a copy in another language, I'd have to manually copy all the data from every field. I find it very time consuming.

So, the question is: is it possible, and if it is, then how do I modify the plugin so that when I create a copy in other languages the contents of the page and, preferrably, the creDate too, were copied over as well.

I can see that it's probably something in i18n_base/pages.php but I'm still a noob in php and can't quite wrap my head around this. I see that metadata is copied over, then why not some other stuff too.

p.s. also, is there any easy way to return i18n page title?
Reply
Hi,

could you please consider this need and really useful idea :
http://get-simple.info/forums/showthread.php?tid=6899

Sincerely thanks.

Miguipda ;-)
Reply
(2014-10-09, 17:00:18)mvlcek Wrote:
(2014-10-09, 03:40:56)barthusz Wrote: Hi,

I am setting up a multi language site but I really want the correct page name of each translated page in the url in stead of the English page slug with the right country code before it.
...
Is this possible?

No, I18N does not support this.

This would be a great feature though. Any chance you'd consider adding it, mvlcek?
Reply
Thank you all for your feedback!! And hopefully it would be in a future release.
Reply
Just wondering if anyone else is having a similar problem with the tree view function of hierarchical menus when working in the admin?

I am no longer able to open a set of grouped pages (e.g. parent and children) after the update I did for the i18n set of plugins. The little link at the font of th eset of pages will not open when clicked.

That's really a problem as that view is the best way to manage the site. View all pages will allow me to see pages but not grouped by parent.

Thank you for any help you can provide.
Sherri
Reply
(2014-11-15, 12:48:38)sarnaiz Wrote: I am no longer able to open a set of grouped pages (e.g. parent and children) after the update I did for the i18n set of plugins. The little link at the font of th eset of pages will not open when clicked.

Do you get a javascript error?
The most probable reason would be that you have created a circular reference, i.e. a page's parent's (...) parent is this page.
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply
(2015-01-28, 04:52:53)mvlcek Wrote:
(2014-11-15, 12:48:38)sarnaiz Wrote: I am no longer able to open a set of grouped pages (e.g. parent and children) after the update I did for the i18n set of plugins. The little link at the font of th eset of pages will not open when clicked.

Do you get a javascript error?
The most probable reason would be that you have created a circular reference, i.e. a page's parent's (...) parent is this page.

Hi Martin,

I think this has solved itself. I went back to the older version of GS on this site and then recently retried the update and it is working now. I noticed I didn't have any similar issue on other GS sites I have when upgrading so I have no idea what could have caused it, but I'm thankful I don't have the issue any more.

If I see this come up again, I will look at the parent pages for each page to see if I have a circular reference happening.

Thank you for responding!
Reply
This is probably quite trivial and I'm missing something, but I can't work out how to do the following:

I have a horizontal menu on the site I'm working on. One the menu items produces a dropdown when hovered over. I would like this item to remain in the menu, but to not be clickable at all, so that only the links in the dropdown lead to pages.

Is this doable?

[eta: latest version of the I18N nav plugin; latest version of GS CMS]
Reply
@mvlcek
It would be great if I18N used the 'sitemap' filter in GS 3.3.x
It would allow other plugins to insert their entries in the Sitemap.
Reply
Or alternatively, if there are some difficulties in implementing this, I18N could have its own 'i18n-sitemap' (or whatever) filter that allows other plugins to do this.

In my case, I'm trying to make News Manager work more or less properly with I18N installed, but this issue makes it difficult.

ref: http://get-simple.info/forums/showthread...4#pid47784
Reply
Hello, I have an odd request from a client... I need to limit the number of dropdown items displayed for a specific parent item (special-offers), is this possible? This is the code in my template:

PHP Code:
<?php get_i18n_navigation(return_page_slug(),0,2,I18N_SHOW_MENU$component='apsnav'); ?>

And this is the component I'm using for a custom render:

PHP Code:
<li<?php if ($item->hasChildren) { ?> class="dropdown"<?php ?>><a href="<?php echo htmlspecialchars($item->link); ?>"<?php if ($item->hasChildren) { ?> data-toggle="dropdown" class="dropdown-toggle"<?php ?>><?php echo htmlspecialchars($item->text); ?><?php if ($item->hasChildren) { ?><b class="caret"></b><?php ?></a>
<?php if ($item->isOpen) { ?>
<ul<?php if ($item->hasChildren) { ?> role="menu" class="dropdown-menu"<?php ?>>
    <?php $item->outputChildren(); ?>
</ul>
<?php ?>
</li> 
Reply
(2015-02-17, 02:53:57)bensayers Wrote: Hello, I have an odd request from a client... I need to limit the number of dropdown items displayed for a specific parent item (special-offers), is this possible?

If you set a class "nav-" + slug to your <li>, you can use a CSS rule (here max. 5 items):
Code:
li.nav-special-offers li + li + li + li + li + li { display: none; }

There is no easy/medium way to limit the output of the children, unless you use return_i18n_menu_data and do the rendering completely yourself.
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply
(2015-02-17, 04:20:07)mvlcek Wrote: If you set a class "nav-" + slug to your <li>, you can use a CSS rule (here max. 5 items):
Code:
li.nav-special-offers li + li + li + li + li + li { display: none; }

This works great, gets the job done with minimal effort. What a simple solution - as always, thank you for your assistance Martin! FYI, I modified the CSS a bit to make it a bit shorter:

Code:
li.nav-specials li:nth-child(n+4) { display: none; }
Reply
two suggestions for the navigation plugin.. to make it a lil bit more flexible, and at the same time more 'compatible' with base/unrecompiled bootstrap3 css....

1. optionally use list items for each item in breadcrumbs (the ol tags would be in the template or component the breadcrumb is called from, so not added by the plugin itself).. inserting a specified class to the last (current page's) li and skipping its link (not needed for the last/current page)
2. param to change the class added to current item in a nav menu from 'current' to whatever else might be desired

easy enough to go in and hard code the changes in the plugin's code, but others may see some value in the extra options..
Reply
Since the variations are infinite, ideally you should use a custom component if you need custom stuff like that, there are even examples in the forum of i18n nav components for bootstrap navs. It is fairly easy.
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
@mvlcek, is there a specific reason why $slugparent in find_i18n_url doesn't have default value ? using find_i18n_url('slug') throws Warning, so it needs to be called with find_i18n_url('slug', null) .. isn't it simpler to put $slugparent=null into function definition ? or can this modification break something ?
Reply




Users browsing this thread: 9 Guest(s)