Giter Club home page Giter Club logo

ceceppa-multilingua's People

Contributors

ceceppa avatar mte90 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

ceceppa-multilingua's Issues

Bug when editing theme translations with more than one language

I've found a bug, when editing theme translations and you enable more than one language.
The keys of textareas are wrong so when submit the form, translations are saved in the correct lang, but in the wrong string.

I've found what I believe it's cause of it. In file po-parser.php, line 257, I've moved out of the foreach the $id incrementation:

Changing this:

   $id++;
} //foreach

For this:

} //foreach
$id++;

I do not perform an exhaustive check, but at least with this change theme translation works ok.

The plugin slows down the website

This query takes ages to be executed and the result is the website takes like 30 seconds to be loaded.

SELECT DISTINCT meta_value, posts.ID, post_title
FROM wp_ceceppa_ml_relations as cc, wp_posts posts, wp_postmeta as postmeta
WHERE postmeta.meta_key='post_views_count' AND
postmeta.post_id = posts.ID AND
post_type='post' AND
post_status = 'publish' AND
cc.lang_1 = posts.ID
ORDER BY CAST(meta_value AS DECIMAL) DESC
LIMIT 0 , 4

We have indexed the field lang_1 and it's a little bit faster.

Can you have a look please?

Feed by category

in the html is not inserted the url for the feed category :-/
And the link doesn't work, they redirect to the first post that contain the terms

CSS bug in backend with WP Seo by Yoast

The metabox of Wp Seo by yoast have a little problem of alignment of tabs created by the file admins.css on line 454:

.advanced {
    background: none repeat scroll 0% 0% #FFF;
    cursor: default !important;
    overflow: hidden;
    transition: all 0.2s ease-in-out 0s;
    display: block !important;
}

The problem is display block

Small issue with custom flag image url

In Api.php and api.old.php
all occurencies of
,,,
CML_UPLOAD_URL . "/$size/$flag.png"
,,,
need to be replace with
,,,
CML_UPLOAD_URL . "$size/$flag.png"
,,,

otherwise the image url has a double // before image size, cause the trailing slash is already appended to CML_UPLOAD_URL .

I know this is a small issue but give URL error with scraping tool for SEO purpose.

post author rewrites for all linked posts

Could you please change the next line in \ceceppa-multilingua\admin\admin-posts.php on line 409
FROM
'post_author' => get_current_user_id(),
TO
'post_author' => $_POST['post_author'],
?
Cause after creating/updating post - author sets as user you are logged in instead of post author.

Remove Default "category" slug in permalink

One cool feature for SEO would be to remove defalut "category" slug that WP prepend to category URL.
Since you have added the chance to translate "category" word in other languages, SEO Yoast option that remove the word doesn't work anymore.

Here it is some WP rewrite rules that I use to remove "category" word from category urls.
It has to be updated because it only manage 2 langs:

add_filter( 'category_rewrite_rules', 'filter_category_rewrite_rules' );
function filter_category_rewrite_rules( $rules ) {
    global $wpdb;
    $categories = get_categories( array( 'hide_empty' => false ) ); 
    if ( is_array( $categories ) && ! empty( $categories ) ) {
        $slugs = array();
        $slugs_en = array();
        foreach ( $categories as $category ) {
            $it='';
            $en='';
            if ( is_object( $category ) && ! is_wp_error( $category ) ) {
                if ( 0 == $category->category_parent ):
                    $slugs[] = $category->slug;
                    $en = $wpdb->get_var( "SELECT UNHEX(cml_cat_translation_slug) FROM wp_ceceppa_ml_cats WHERE cml_cat_id=".$category->term_id );
                    $slugs_en[] = $en;          
                else:
                    $it=trim( get_category_parents( $category->term_id, false, '/', true ), '/' );
                    $slugs[] = $it;
                    $it_slugs= explode ( '/', $it );
                    foreach ($it_slugs as $it_slug) :
                        $cat=get_category_by_slug( $it_slug );
                        $en .= $wpdb->get_var( "SELECT UNHEX(cml_cat_translation_slug) FROM wp_ceceppa_ml_cats WHERE cml_cat_id=".$cat->term_id ) . '/';
                    endforeach;
                    $slugs_en[] = trim($en, '/' );          
                endif;
            }
        }
        if ( ! empty( $slugs ) ) {
            $rules = array();
            foreach ( $slugs as $slug ) {
                $rules[ '(' . $slug . ')/feed/(feed|rdf|rss|rss2|atom)?/?$' ] = 'index.php?category_name=$matches[1]&feed=$matches[2]';
                $rules[ '(' . $slug . ')/(feed|rdf|rss|rss2|atom)/?$' ] = 'index.php?category_name=$matches[1]&feed=$matches[2]';
                $rules[ '(' . $slug . ')(/page/(\d)+/?)?$' ] = 'index.php?category_name=$matches[1]&paged=$matches[3]';
            }
    foreach ( $slugs_en as $slug_en ) {
                $rules[ '(' . $slug_en . ')/feed/(feed|rdf|rss|rss2|atom)?/?$' ] = 'index.php?category_name=$matches[1]&feed=$matches[2]';
                $rules[ '(' . $slug_en . ')/(feed|rdf|rss|rss2|atom)/?$' ] = 'index.php?category_name=$matches[1]&feed=$matches[2]';
                $rules[ '(' . $slug_en . ')(/page/(\d)+/?)?$' ] = 'index.php?category_name=$matches[1]&paged=$matches[3]';
            }       
        }
    }
    return $rules;
}

Category Sitemap Issue in SEO Yoast

SEO Yoast now work great with CECEPPA.
The only issue I found is in generated xml sitemap.
Category sitemap contains only original language category url and not translated ones.

Problem with URL's

Hi,

I have translated a page called "Hostel" with the plugin.

captura de pantalla 2016-05-13 a las 18 17 44

The url por spanish version is www.domain.com/hostel and the url for the english is www.domain.com/en/hostel-2

captura de pantalla 2016-05-13 a las 18 17 54

The problem is that when I go to the url www.domain.com/hostel and click on the english flag, the URL changes to ww.domain.com/en/hostel but it stills show the spanish version..

I am using the version 1.5.16 of the plugin and Worpress 4.5.2.

Problem after update to 1.5.13

After upgrade to version 1.5.13 my site is broken, I don't have rights to access admin.php?page=ceceppaml-language-page, slugs don't works etc.

Can't display some woocommerce categories

Catchable fatal error: Object of class WP_Error could not be converted to string in wp-content/plugins/woocommerce/includes/wc-template-functions.php on line 561

Woocommerce Version: 2.5.2
Wordpress Version: 4.4.1
Ceceppa Multilingua support for Woocommerce Verision: 0.8

Translation dropdown

In the page on the backend for set the translated page if the page to assign have the same language of the post in editing it's showed in the dropdown and if have the same name it's impossible reconize the correct page.

I think that in this list the page in editing it's been removed.

Association of other post not work

On the save of a new post in the other language and the setting of the other post in the other language on the save is not saved.
I've to do that many times before that he save that option.

Reseting front page static page

After activation this plugin I have problem with resetting the chosen static page displayed as front page of my site (options-reading.php). In option "Front page displays" I have chosen "A static page (select below)" and selected page in "Front page", "Posts page" is blank. From time to time the "Front page" option is resets and chosen random a static page. I have this issue on my all page with ceceppa.

Comment Language

It would be great if the comments could translated into English to ease understanding of the code.

Same slugs in different languages.

It would be great to be able to have same slugs under different languages. Say a name or word as a title which would be the same in two or more languages.
Example: English - /en/fusion-implementation/, German - /de/fusion-implementation/

Post relation issue

Sometimes a unexpected behaviour appears in post relations.
It happens that post and translated post are no more related and to link them only way is to modify relation in wp_ceceppa_ml_relations table in database.

I can't clearly understand when it happens.

Static Homepage Issue

Sometimes static homepage link in flags are not displaying correctly.
It happens that post slug is appended to the url (while it should have to be like www.siteurl.com/en for example).
Or sometimes ?lang=slug is appended.
Sometimes link are correct but when you are in translated lang homepage flag link are wrong for same page. Example: page is www.siteurl.com/en and english flag link is www.siteurl.com/en/postslug.

I can't success in discover why and when it happens, but I think I found an error in frontend/utils.php on line 33:

foreach( array( $pfp, $pof ) as $id ) {
  //$t = CMLPost::get_translations( $pfp );
  $t = CMLPost::get_translations( $id  );

(wrong line commented and suggested correction on next line).

Error in advanced wiew

I get this error in advanced view form the settings in the quick edit mode panel for every cpt

Warning: in_array() expects parameter 2 to be array, string given in /data/vhosts/mte90.net/httpdocs/wp-content/plugins/ceceppa-multilingua/admin/layouts/options-advanced.php on line 35

http500 when trying to upload a translation

Hi

I'm using Ceceppa rel. 1.5.17 on WordPress 4.7.5
I've configured Italian as default language, with English as second language

if I try to publish a post with both languages, I experience the following error

image

In advanced settings, I've checked following option, but server error always happens

image

any hint?
thanks in advance

Homepage and translating SEO metadata with SEO Yoast

When using Ceceppa multilang with SEO Yoast and set homepage as list of latest articles there is no way to translate metadata (metatitle, metadesc and og metadata).
In every translated version WP always use original language metadata.

Permalink options

I can't edit permalink options - I have PHP fatal error in /wp-admin/options-permalink.php after update the plugin:

Warning: require_once(/home/xxx/domains/xxx/public_html/wp-content/plugins/ceceppa-multilingua/admin/admin-permalink.php): failed to open stream: No such file or directory in /home/xxx/domains/xxx/public_html/wp-content/plugins/ceceppa-multilingua/admin/admin.php on line 124

Fatal error: require_once(): Failed opening required '/home/xxx/domains/xxx/public_html/wp-content/plugins/ceceppa-multilingua/admin/admin-permalink.php' (include_path='.:/usr/local/php5/lib/php:/usr/local/lib/php') in /home/xxx/domains/xxx/public_html/wp-content/plugins/ceceppa-multilingua/admin/admin.php on line 124

SEO YOAST Breadcrumbs error for second level sub-category

While using SEO Yoast breadcrumbs for posts, all is correct until you have only one level deep category.

When you have a sub-category (for example a post that is behind "cars" - "old cars"), the subcategory in the breadcrumbs is not translated.

Screenshot

Search in My Translation

Hi mate, I'm here just to give you a suggestion of improvement for the future. On our site we have 9 pages of strings in "My Translations" and finding a string to edit starts to be really hard. Would be nice to have a search box on top of the "My Translations" page.

Thanks for your work!

Loading JS in header instead in footer

Plugin loads some JS files (../ceceppa-multilingua/js/ceceppaml.js + jquery) in header which slows down website. Could You change it to load this files in footer?

Page already sent...

Ciao Alessandro, appena attivato su nuovo sito mi ha dato questo errore, di solito è causato da uno spazio dopo la chiusura del php ?>, io ho trovato che potrebbe essere nel file settings.php, eliminando lo spazio non mi è più capitato.

Eventualmente puoi non chiudere i file php.

Ciao

SSL in dashboard and unsecured flags images

I have enabled SSL in dashboard and with ceceppa-multilingua plugin I have problem with secure because plugin always added unsecure URL to CSS:

`

`

Problem disappeared when I uncommented line for definition CML PLUGIN CACHE URL:
define( 'CML_PLUGIN_CACHE_URL', CML_PLUGIN_URL . trailingslashit ( 'cache' ) );
and commented second definition:
define( 'CML_PLUGIN_CACHE_URL', CML_UPLOAD_URL . trailingslashit ( 'cache' ) );
Please fix it.

Slug translated from name with special characters not working

Noticed that slugs converted from the translated names are incorrect.
Example: CML translates 'Tür' to 'tur' and WordPress does 'Tür' to 'tuer'. (The latter one being correct.)
This corrupts the taxonomy links in the posts and pages.
It might be an idea to add another set of language fields for the slug as well. That way a custom slug for the different languages can be defined.
(This is probably a bug (wrong translation) + feature (custom slug per language).)

shortcode [:it]testo[/:it] nell'excerpt

@ceceppa è possibile usare lo short code

[:en]English text here.[/:en]
[:ar]Arabic text here[/:ar]

nel excerpt? Ho provato ma sembra non funzionare. Sarebbe molto utile per noi, pensi di poterlo aggiungere?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.