jDiction Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

jDiction 2.2.0 released. http://jdiction.org/downloads

Author Topic: Blank Screens  (Read 17297 times)

jstead

  • Newbie
  • *
  • Posts: 26
    • View Profile
Blank Screens
« on: August 27, 2014, 03:21:41 am »

Hi Harald,

I am in the process of implementing jdiction on our new website, after having it working on an development site.

After following the installation steps everything looked to have gone smoothly with the language switcher appearing on the front end and working correctly.
The issue I have is in the back end;
  • the check page just shows a blank white page
  • clicking on the tranlsate icon in list view or within an article/menu etc shows only a blank white page
  • when importing an xliff file on click upload I am left with a blank white page
I am able to export the xliff with no issues, and K2 is working once adding the jdiction.xml to the correct folder.
Console doesn't look to be showing any errors, not sure how to turn on the php errors you have mentioned in some other threads.

Any advise on next step is appreciated.

Regards,
Jason
Logged

Harald Leithner

  • Administrator
  • Hero Member
  • *****
  • Posts: 1688
    • View Profile
Re: Blank Screens
« Reply #1 on: August 27, 2014, 10:13:55 am »

which php and jdiction version do you use?

do you have access to the apache error.log?

you may activate the error reporting in joomla configuration, if this doesn't work you can try to add this to the begin of the index.php in the administrator directory:

Code: [Select]
ini_set('display_errors',1);
ini_set('display_startup_errors',1);
error_reporting(-1);
Logged
Joomla! 5.0 Release Manager
Vote at JED

jstead

  • Newbie
  • *
  • Posts: 26
    • View Profile
Re: Blank Screens
« Reply #2 on: August 28, 2014, 01:59:40 am »

Thanks you for the prompt reply.

php 5.3.15
Joomla 2.5.24

Error.log only reported some missing files that I knew about (images which I hadn't uploaded)
Everything else reports no errors.

Have done 2 rollbacks/re installs  (joomla 2.5.19) to no success.

Is there anything else we can try.
Logged

jstead

  • Newbie
  • *
  • Posts: 26
    • View Profile
Re: Blank Screens
« Reply #3 on: August 28, 2014, 03:23:55 am »

Hi Harald,

Got it all sorted now. Ended up being that "DOM manipluation" wasn't installed as mentioned in another thread.

Will be finally doing our 17000+ word count .xliff export/import to 7 languages using the CAT tool (you where helping with in a previous thread earlier in the year) over the next 2 weeks. Will let you know how it goes.

Thanks,
Jason
Logged

Harald Leithner

  • Administrator
  • Hero Member
  • *****
  • Posts: 1688
    • View Profile
Re: Blank Screens
« Reply #4 on: August 28, 2014, 11:45:07 am »

ok thx would be nice to see the site.

My biggest site has 8 Languages and 68000+ words, so I think jdiction can handle big sites ;-)
Logged
Joomla! 5.0 Release Manager
Vote at JED

jstead

  • Newbie
  • *
  • Posts: 26
    • View Profile
Re: Blank Screens
« Reply #5 on: August 29, 2014, 10:08:00 am »

Hehe no doubt, its great!

Was more so from the translation agency CAT program xliff export/import process side of things as we did a fair bit of back and forth when I was originally testing the process.

Quick question - Just noticed that the menu alias, aren't available in the menus-item xliff export. (i remember these being included?) Is there anything required to have them included?

Logged

Harald Leithner

  • Administrator
  • Hero Member
  • *****
  • Posts: 1688
    • View Profile
Re: Blank Screens
« Reply #6 on: August 29, 2014, 01:46:45 pm »

The menu alias will not be exported because there is no function that normalizes the input.

If you enter a space or a Uppercase character you have a problem with the url.

Maybe I should fix this.

You can change the export setting in the xml file. (there is something with export="false" or so)
Logged
Joomla! 5.0 Release Manager
Vote at JED

jstead

  • Newbie
  • *
  • Posts: 26
    • View Profile
Re: Blank Screens
« Reply #7 on: September 01, 2014, 03:17:05 am »

Hi Harald,

Which xml would i need to alter to have the alias field appear in an xliff export?

Could JFilterOutput::stringURLSafe() be utilized on this field during either saving (manual update) or importing?
http://docs.joomla.org/Supporting_SEF_URLs_in_your_component#The_Alias


Also trying to add in the K2 extra fields so they can be translated (even just manually). Would along the lines of adding
Code: [Select]
<field type="text" name="K2ExtraField_6">Extra Fields</field>
to the jdiction.xml in com_k2 be on the right track? (using the field name that I use [matches k2 input name])?

Basically would love to be able to get the extra field from image 1 attached, and have it appear under the translation menu like the other fields in image 2? As at the moment this one line will remain in english. Guessing this one is so tricky as everyone's Extra fields are different.

Thanks again for the great support on a great extension. Very much appreciated.
Logged

Harald Leithner

  • Administrator
  • Hero Member
  • *****
  • Posts: 1688
    • View Profile
Re: Blank Screens
« Reply #8 on: September 01, 2014, 02:26:52 pm »

The menu aliases are at /libraries/jdiction/tables/menus.xml in line 21 (remove export="false")

I know the function JFilterOutput::stringURLSafe() (btw the correct function is JApplicationHelper::stringURLSafe) but it needs to be tested and written.

I use this code in the translate function if you enter it by hand:
Code: [Select]
            if (version_compare(JVERSION, '3.2.0', 'ge') && (string)$this->reference->form->getField($k)->getAttribute('type') == 'jdalias') {
              $refField = (string)$this->reference->form->getField($k)->getAttribute('field');
              switch($status[$language->lang_code][$k]) {
                case 'remove':
                  unset($langdata[$language->lang_code][$k]);
                  $isUpdated = true;
                  break;
                case 'unchanged':
                case 'changed':
                default:
                  if ($langdata[$language->lang_code][$k] == '') {
                    $langdata[$language->lang_code][$k] = $langdata[$language->lang_code][$refField];
                  }
              }

              $langdata[$language->lang_code][$k] = JApplicationHelper::stringURLSafe($langdata[$language->lang_code][$k]);
              if (trim(str_replace('-','',$langdata[$language->lang_code][$k])) == '') {
                unset($langdata[$language->lang_code][$k]);
                $isUpdated = true;
              } else {
                if ($data['value'][$k] != $langdata[$language->lang_code][$k]) {
                  $isUpdated = true;
                }
              }
              unset($refField);
            } else {...

But this code works only for Joomla 3.2+, because some xml restrictions with 2.5.

I should also give the option to export the alias because many translator don't understand this field or do double work.

So yes I will include it but need some time ;-)
Logged
Joomla! 5.0 Release Manager
Vote at JED

Harald Leithner

  • Administrator
  • Hero Member
  • *****
  • Posts: 1688
    • View Profile
Re: Blank Screens
« Reply #9 on: September 01, 2014, 02:31:48 pm »

The k2 thing is  much more tricky because the fields are saved in json array and splitted in multiple tables.

the only thing you can do is to uncomment:

Code: [Select]
<!--
<field type="text" name="extra_fields">Extra Fields</field>
<field type="text" name="extra_fields_search" maxlength="255">Extra Field Search</field>
-->

by removing <!-- and  -->
Logged
Joomla! 5.0 Release Manager
Vote at JED

jstead

  • Newbie
  • *
  • Posts: 26
    • View Profile
Re: Blank Screens
« Reply #10 on: September 01, 2014, 07:20:23 pm »

Great thank you will look into the menu alias stuff, but sounds like manual tweaking them is way to go.

I had commented out the 2 lines for extra fields but nothing changed when clicking the translate button. Only see theother fields options that were there already. Are there any other requirements to have this show or dependant on what extra fields I have set up?
Logged

jstead

  • Newbie
  • *
  • Posts: 26
    • View Profile
Re: Blank Screens
« Reply #11 on: September 03, 2014, 09:55:47 am »

Where does uncommenting these 2 lines change? Do they become available in the k2-item translation screen? similar to
image_caption
image_credits etc?


Logged

Harald Leithner

  • Administrator
  • Hero Member
  • *****
  • Posts: 1688
    • View Profile
Re: Blank Screens
« Reply #12 on: September 03, 2014, 11:22:25 am »

Yes thats the plan, I will check this.
Logged
Joomla! 5.0 Release Manager
Vote at JED

Harald Leithner

  • Administrator
  • Hero Member
  • *****
  • Posts: 1688
    • View Profile
Re: Blank Screens
« Reply #13 on: September 03, 2014, 11:29:17 am »

With the Attached File I get 2 new fields with json data, you have to translate the complete array.
Logged
Joomla! 5.0 Release Manager
Vote at JED

jstead

  • Newbie
  • *
  • Posts: 26
    • View Profile
Re: Blank Screens
« Reply #14 on: September 04, 2014, 05:03:15 am »

Thank you Harald,

Had an odd issue where jdiction.xml-bak was still being picked up when uploading the new .xml preventing this fields from showing (is this something with xml files specifically as I use this naming convention all over the place .php-bak, htaccess-bak, etc with  no troubles)?

But got it working once left only the one file in the directory.

I ended up adding the this code
Code: [Select]
export="false" filter="JComponentHelper::filterText"to the 2 lines that were un-commented.
Code: [Select]
<field type="textarea" name="extra_fields" export="false" filter="JComponentHelper::filterText">Extra Fields</field>
<field type="textarea" name="extra_fields_search" export="false" filter="JComponentHelper::filterText">Extra Field Search</field>
export=false was added as the export was "as you mentioned" is in a format that would be easier to manually do than go through the CAT tool, (also there where a lot closing > where missing from the </target and </source for the extra fields when exported. (not all but majority))

I also added the filter, as one of the custom fields is an image tag that was being stripped on saving. This fixed it.

Thank you again for the great support.

Logged