Welcome to the new home of the Cumulus Support forum.

Latest Cumulus release v1.9.4 (build 1099) - Nov 28 2014
Latest Cumulus MX release - v3.0.0 build 3044 7 December 2018. See the Wiki for download

wxcurecords.php issue

Discussion of Ken True's web site templates

Moderator: saratogaWX

Post Reply
User avatar
aznetcowboy
Posts: 275
Joined: Fri 04 Jan 2013 6:03 pm
Weather Station: Davis 6153 Vantage Pro2
Operating System: Windows 10 Home 64-bit
Location: Tucson, AZ
Contact:

wxcurecords.php issue

Post by aznetcowboy » Fri 05 Oct 2018 6:28 pm

When checking out my links, for the All-Time Records I am getting the following Error:

Highest Humidity
Warning: Missing argument 1 for langtrans(), called in /home/gydfbaoo/public_html/wxcurecords.php on line 105 and defined in /home/gydfbaoo/public_html/common.php on line 60
99 % 27-Jan-2013 6:10am

Lowest Humidity
Warning: Missing argument 1 for langtrans(), called in /home/gydfbaoo/public_html/wxcurecords.php on line 110 and defined in /home/gydfbaoo/public_html/common.php on line 60
0 % 18-Sep-2013 3:10pm
Highest Dew Point
Warning: Missing argument 1 for langtrans(), called in /home/gydfbaoo/public_html/wxcurecords.php on line 116 and defined in /home/gydfbaoo/public_html/common.php on line 60
93.3 °F 23-Jul-2013 4:35pm
Lowest Dew Point
Warning: Missing argument 1 for langtrans(), called in /home/gydfbaoo/public_html/wxcurecords.php on line 121 and defined in /home/gydfbaoo/public_html/common.php on line 60


The code they referenced is in the wxcurecords.php (which I believe is current) for example with the Highest Humidity:

104<tr class="column-light">
105 <td><?php langtrans('Highest Humidity'); ?> <?php langtrans(); ?> </td>
106 <td><?php print $WX['humH']; ?> <?php print $SITE['uomHum']; ?></td>
107 <td><?php print fix_CU_record_date($WX['ThumH']); ?></td>
108</tr>


The other three have basically the same code. The langtrans code they are referencing is:

function langtrans ( $item ) {
global $LANGLOOKUP,$missingTrans;

if(isset($LANGLOOKUP[$item])) {
echo $LANGLOOKUP[$item];
} else {
if(isset($item) and $item <> '') {$missingTrans[$item] = true; }
echo $item;
}


This error is only when viewing the All-Time Records, the others all display correctly. I am currently baffled by only these four records having this problem. Am I blind in one eye while having problems seeing out of the other eye or what?
:?
Tom Wills
Kingston Knolls Terrace, Tucson, AZ

El Gheko Neighborhood Weather Station: http://www.elgheko.us
El Gheko Neighborhood Association: http://na.elgheko.us

Image

User avatar
aznetcowboy
Posts: 275
Joined: Fri 04 Jan 2013 6:03 pm
Weather Station: Davis 6153 Vantage Pro2
Operating System: Windows 10 Home 64-bit
Location: Tucson, AZ
Contact:

Re: wxcurecords.php issue

Post by aznetcowboy » Fri 05 Oct 2018 6:48 pm

Forget what I posted here, I found the solution. It was right in front of me the whole time and I just could not see the obvious problem and solution.
:groan:

All I needed to do was to take line 105
<?php langtrans('Highest Humidity'); ?> <?php langtrans(); ?>

and change it to
<?php langtrans('Highest'); ?> <?php langtrans(' Humidity'); ?>

The same for lines 110, 116 and 121. This is a real good example of the most apparent solution is staring me right in the face and I couldn't see it.
:bash:
Tom Wills
Kingston Knolls Terrace, Tucson, AZ

El Gheko Neighborhood Weather Station: http://www.elgheko.us
El Gheko Neighborhood Association: http://na.elgheko.us

Image

User avatar
PaulMy
Posts: 1730
Joined: Sun 28 Sep 2008 11:54 pm
Weather Station: Davis Vantage Pro 2+ w/Envoy USB
Operating System: Windows-8
Location: Komoka, ON Canada
Contact:

Re: wxcurecords.php issue

Post by PaulMy » Fri 05 Oct 2018 9:00 pm

Glad you found it and able to correct.

Enjoy,
Paul

Post Reply