Hi All on my 1st post in the community :)
I want to develop a plugin which has a widget. I've started recently to develop a social network and for test purposes I've followed the tutorial to make the plugin/widget "Hello, world!". Everything runs fine when I activate it, but when i logout or i try to login, a blank screen appears and nothing happens. If i remove the plugin from /mod/ list via ftp, everything runs fine again.
Sometimes, when I try to reload the page a red message appears showing that "There is a missing __token or __tr". I've been reading the documentation and, as far as I know, this is a security enhacement which is a must since elgg 1.7, mainly when you are using forms, but.... the only thing that the widget shows is a "Hello, world" message!!
Any help plz?? I am a bit confused.
Thanks in advice and sorry for my english
info@elgg.org
Security issues should be reported to security@elgg.org!
©2014 the Elgg Foundation
Elgg is a registered trademark of Thematic Networks.
Cover image by RaĆ¼l Utrera is used under Creative Commons license.
Icons by Flaticon and FontAwesome.
- Kevin Jardine@kevin
Kevin Jardine - 0 likes
- azazoth@azazoth
azazoth - 0 likes
- Kevin Jardine@kevin
Kevin Jardine - 0 likes
- azazoth@azazoth
azazoth - 0 likes
- azazoth@azazoth
azazoth - 0 likes
You must log in to post replies.You are likely trying to reference a logged-in user entity when logged out.
Check your PHP error log - that should say.
Ok, I will try but I'm not sure... I'm going to paste the code:
The file start.php contains the following:
<?php
function mkonline_init(){
add_widget_type('mkonline',elgg_echo('mkonline:widget_name'), 'Marketing online');
}
register_elgg_event_handler('init', 'system', 'mkonline_init');
?>
The directory /mod/mkonline/views/default/widgets/mkonline/view.php has the following:
<div class="contentWrapper">
<?php
echo elgg_echo('mkonline:smscamp');
?>
</div>
I have also a /language/ folder which has the translations in spanish: (file es.php)
<?php
$spanish = array(
'mkonline:widget_name' => 'Marketing Online',
'mkonline:smscamp' => 'Marketing por SMS',
'mkonline:mailcamp' => 'Marketing por MAIL',
);
add_translation("es",$spanish);
?>
That's all... there are no more files. The default language is Spanish and the other plugins works properly....
No:
/mod/mkonline/views/default/widgets/mkonline/edit.php
?
Usually a widget has both although it should not matter if it is missing.
Thanks for your advice Kevin,
I've just added the edit.php file but again, the same issue....
What could it be?? I'm only adding a widget which displays a text... I've followed step by step the Hello World Tutorial... may it be another plugin's interference??
Thanks again
Any other ideas plz??? Still not working... :(