[Resolved] Issue in retrieving portfolio items

Home Support English Support [Resolved] Issue in retrieving portfolio items

This topic contains 14 replies, has 2 voices, and was last updated by  Michele 11 months, 3 weeks ago. The support staff assigned to this topic is Harshad.

Viewing 15 posts - 1 through 15 (of 15 total)
Author Posts
Author Posts
March 27, 2013 at 6:37 pm #115401

Michele

Hello,

I recently encountered an issue in the visualization of portfolio items in my theme somewhat related to WPML.

Since it looks like a very theme-specific issue (Kriesi's Flagship theme, developed using the Avia Framework), I already asked for help in the theme developer's support forum ( http://www.kriesi.at/support/topic/issue-in-retrieving-portfolio-items ).

I understand it's not you problem to guarantee theme compatibility, but I hoped you could maybe give some hints or ideas to try and solve this issue.

Basically, the theme makes some pages retrieve portfolio items filtered by category, and displays them in a grid style (like this: http://www.kriesi.at/themes/flagship/template-files/portfolio-4-columns/ ).
For some reason, the moment I enable the WPML plugin, these views stop working since (I suppose) the page can't find the portfolio items.

You could try to have a look at the other support forum (linked above) to understand better.

If you could give me some hints I'd really appreciate that, otherwise I completely understand: this is not your business after all..

Thanks

March 27, 2013 at 9:22 pm #115419

Harshad
Forum moderator

Dear Michele,

Can you please attach a screenshot, how you are adding portfolio items?

March 28, 2013 at 8:56 am #115485

Michele

Of course, you can find them as attachements.

March 28, 2013 at 1:42 pm #115585

Harshad
Forum moderator

Dear Michele,

The strings that are part of the options that the plugins or themes save in the wp_options table.

When themes and plugins use get_option, they read values from the wp_options table. WPML can filter these calls and provide translation to the values of these options.

For this you can create a language configuration file, which tells WPML which Admin texts you want to translate.

http://wpml.org/documentation/support/language-configuration-files/

March 28, 2013 at 2:14 pm #115598

Michele

Thanks, this looks really relevant.

Would you be able to translate this into a practical action for me? :)
I also asked in the theme's support forum, as they could have the complementary information.

March 28, 2013 at 7:06 pm #115652

Harshad
Forum moderator

Dear Michele,

I have sent you email with a file attached, please follow the steps below:

1) Upload the attached file to wordpress root folder
2) This file will create a code for wpml-config.xml file.
3) Then execute the file using http://yourdomainname.com/create_wpml_config.php?option_name=<option_name>
4) Copy the code to your wpml-config.xml file
5) Upload the wpml-config.xml file to your themes root folder.

Note :: Replace <option_name> with actual option_name used by your theme.

April 3, 2013 at 8:15 am #116661

Michele

Dear Harshard,

I asked the theme developers and they guess the <option_name> should be current_theme (http://www.kriesi.at/support/topic/issue-in-retrieving-portfolio-items#post-103764)
Trying to use that option into the create_wpml_config.php file gives this output:

<wpml-config>
<admin-texts>
<key name="current_theme">
Warning: Invalid argument supplied for foreach() in /htdocs/public/www/create_wpml_config.php on line 23 </key>
</admin-texts>
</wpml-config>

However, Nick on the other forum is asking:
<blockquote cite="Nick on Kriesi support forum">Ask Harshad if the php file he sent you accepts: (a) transient option fields and whether they should be added</blockquote>

He also gave me this file (http://pastebin.com/1jRS8XWh) to try to replace the theme's original xml file, but it doesn't work :(

April 3, 2013 at 3:31 pm #116801

Harshad
Forum moderator

Dear Michele,

The pastebin url is not working at my side, can you email me the file to my email address?

Also can you please send me your ftp and wp-admin details, I will try to execute the file and create code.

April 5, 2013 at 2:25 pm #117314

Michele

Dear Harshard,

I sent you an email with the details you asked for.
In the mean time, the latest xml I generated (http://www.kriesi.at/support/topic/issue-in-retrieving-portfolio-items#post-104388 ) activated a lot of new strings in the WPML > String translation menu.

I tried translating the item that seems nearer to my problem, which is an item named "[avia_options_flagship][avia]portfolio-slug", whose string is "prodotto" (italian for "product"), that is the one I placed into my theme options (see screenshot in the previous post). However, I can't see how this could solve the issue and in fact it doesn't.

What is your expectations about what to do next?

I will now try not to touch anything else so you can see everything with your own eyes via FTP and wp-admin.

April 6, 2013 at 7:20 am #117459

Harshad
Forum moderator

Dear Michele,

I have checked the file and code seems to be correct, I went to WPML -> String Translation, enabled "Disable auto-register string" option, deleted the "Prodotto" translation and translated it again.

Can you please check if its now displaying the translated text on website front?

April 6, 2013 at 8:37 am #117462

Michele

Dear Harshad,

I'm not sure where exactly I should check to see if the translated text is displayed correctly.
Certainly, this fix did not solve the portfolio display issue.

You could also see it yourself by going to pages like:
• http://www.berza.it/prodotti/linea-medica/ (translated into http://www.berza.it/en/products/medical-line/ )
• http://www.berza.it/prodotti/linea-parrucchiere-estetica/ (tr. into http://www.berza.it/en/products/hairbeauty-professionals/ )
• http://www.berza.it/prodotti/linea-food/ (tr. into http://www.berza.it/en/products/food-line/ )
and trying deactivating WPML.

April 6, 2013 at 11:22 am #117468

Harshad
Forum moderator

Dear Michele,

Did you translate the portfolio categories from Portfolio Items -. Portfolio categories.

If yes, then you will have to search for category id's from string translation and add the translated English Category id in wpml -> string translation.

April 10, 2013 at 8:09 pm #118377

Michele

Dear Harshad,

I took a step back.
You can see how I proceeded in the Kriesi support forum here: http://www.kriesi.at/support/topic/issue-in-retrieving-portfolio-items.

Since a fresh install shows no compatibility problem between Flagship theme and WPML, I decided to understand when things broke for me in the first place.

So I reverted to the original DB backup that I made before even starting the migration from qTranslate to WPML, when everything was working fine.

I used a plugin (your qTranslate importer with WPML disabled) to clean wp_posts content from qTranslate junk.

FYI, qTranslate simply translates content using this structure:

<!--:it-->Some text in Italian<!--:--><!--:en-->Some text in English<!--:-->

and selectively displays the right content based on the language you choose. I discovered later that this approach is too basic and does not allow for a complete translation of a website based on the Flagship theme.
The cleaning was simple. After that, I checked all around the wp-admin for stuff that still had the qTranslate syntax, and in the end I directly searched the database to find any occurrence of the :it/:en structure and fixed them manually. Also, I deleted the freshly created entries in the wp_postmeta table that assigned a _qt_cleaned meta information to all the posts that were cleaned.

At this point, my DB looks fine, or at least there is a perfectly reasonable number of records and the ones I can understand make sense.

Here, I activate WPML. Just activate it. It means it just creates a bunch of db tables but doesn't actually do anything to the functionality of the site (i.e. the portfolio display works).
<strong>–> I made a DB backup here</strong>

Now, I start the setup. Which means I open WPML settings in the admin area and it asks me which is the main language. Italian is already selected, and I click "Next".

<strong>BAM!</strong> Now, and from now on, the portfolio display is broken.
<strong>–> Second DB backup here</strong>

I ran a diff software to see what changes. At this point, my knowledge is no longer enough to understand what is getting broken, but I hope someone else's could be.
You can download the diff "report" along with the two DB exports (just before and just after the key moment) here: http://d.pr/f/y6Z1 (I'm now going to email you this, too)

Please, I'd like to have your opinion on this. I think this is as deep as I can get trying diagnosing the problem.

Thanks,

Michele

April 15, 2013 at 3:57 am #119211

Harshad
Forum moderator

Dear Michele,

Sorry for delay, I have checked your DB, when you do a clean install are contents will get clubbed into Default language, So in your case if its Italian, All posts.pages/categories will be displayed only when you select Italian on frontend.

I suggest you to re-run the importer script, And wait until you see the screen attached in screenshot.

Please follow the steps given in below link
http://wpml.org/documentation/related-projects/qtranslate-importer/

May 7, 2013 at 6:48 pm #125569

Michele

Thanks Harshad,

The first time I ran the importer I saw that screen, and I also copied the content into the .htaccess file.
It was still problematic.

However, thanks for your support.
The client and I decided to go online with Italian only for the moment, and review later the possibility of adding the second language. For that, we'll probably make a fresh install and do "all" from scratch.

Viewing 15 posts - 1 through 15 (of 15 total)

You must be logged in to reply to this topic.