Custom Module not saving and receiving data

Hi,
I have same problem of yours.
I want to read from Dataset fields. I need the geographic location for the google maps.
I am not a programmer. Do you have any idea practically.
thank you.

Hi, I checked the hidden input fields and there filled with information. So that is isn’t the problem I think. I regonized an JavaScript error in my browser console.

ckeditor.js:307 Uncaught TypeError: Cannot read property ‘getEditor’ of undefined(…)

Maybe thats the issue.

Hey can you explain your problem a little bit further. Then I can try to help you :slight_smile:

That is because you are running text_callback from your form controller, and you don’t have any text fields :slight_smile:

You will have to add some logging in your module so that you can see where the problem is being generated - you could log the presence of the $this->layoutid and $this->regionid which I believe are not there.

Ok I will do that! I will post it here asap.

Date,Page,Function,Message
"2017-03-03 08:52:03","module","","Creating new module with MediaID:  LayoutID: 5 and RegionID: 

1130358aac4365e4e3"
"2017-03-03 08:52:03","module","","<errormsg>Undefined index: link</errormsg>
<errornum>8</errornum>
<errortype>Notice</errortype>
<scriptname>D:\Users\user\XAMPP\htdocs\xibo\xibo-cms-1.7.9\modules\3rdparty\qrcode.php</scriptname>
<scriptlinenum>3</scriptlinenum>
"
"2017-03-03 08:52:03","module","","Module created with MediaID:  LayoutID: 5 and RegionID: 1130358aac4365e4e3"
"2017-03-03 08:52:03","module","","<errormsg>Trying to get property of non-object</errormsg>
<errornum>8</errornum>
<errortype>Notice</errortype>
<scriptname>D:\Users\user\XAMPP\htdocs\xibo\xibo-cms-1.7.9\modules\cab.module.php</scriptname>
<scriptlinenum>358</scriptlinenum>
"
"2017-03-03 08:51:59","module","","Creating new module with MediaID: 30684d357508b04cd0e8716168a16496 LayoutID: 5 and RegionID: 1130358aac4365e4e3"
"2017-03-03 08:51:59","module","","<errormsg>Undefined index: link</errormsg>
<errornum>8</errornum>
<errortype>Notice</errortype>
<scriptname>D:\Users\user\XAMPP\htdocs\xibo\xibo-cms-1.7.9\modules\3rdparty\qrcode.php</scriptname>
<scriptlinenum>3</scriptlinenum>
"
"2017-03-03 08:51:59","module","","Module created with MediaID: 30684d357508b04cd0e8716168a16496 LayoutID: 5 and RegionID: 1130358aac4365e4e3"
"2017-03-03 08:51:59","Layout","GetLayoutXml","IN"
"2017-03-03 08:51:59","Layout","GetLayoutXml","OUT"
"2017-03-03 08:51:59","module","SetMediaInformation","Existing Assigned Media XML is: \n <?xml version="1.0"?

>
<root><media id="30684d357508b04cd0e8716168a16496" type="cab" render="html" duration="6000" lkid="" 

userId="1" schemaVersion="1">
                            

<options><name>CallABikeTest</name><latitude>50.1009606</latitude><longitude>8.63961</longitude><radius>500</radius><providernetwork>2</providernetwork><duration>6000</duration><updateInterval>1</updateInterval></options

>
                            <raw/>
                    </media></root>
"
"2017-03-03 08:51:58","module","","Module created with MediaID: 30684d357508b04cd0e8716168a16496 LayoutID: 5 

and RegionID: 1130358aac4365e4e3"
"2017-03-03 08:51:58","Layout","GetLayoutXml","IN"
"2017-03-03 08:51:58","Layout","GetLayoutXml","OUT"
"2017-03-03 08:51:58","module","SetMediaInformation","Existing Assigned Media XML is: \n <?xml version="1.0"?

>
<root><media id="30684d357508b04cd0e8716168a16496" type="cab" render="html" duration="6000" lkid="" 

userId="1" schemaVersion="1">
                            

<options><name>CallABikeTest</name><latitude>50.1009606</latitude><longitude>8.63961</longitude><radius>500</r

adius><providernetwork>2</providernetwork><duration>6000</duration><updateInterval>1</updateInterval></options

>
                            <raw/>
                    </media></root>
"
"2017-03-03 08:51:57","Layout","GetLayoutXml","IN"
"2017-03-03 08:51:57","Layout","GetLayoutXml","OUT"
"2017-03-03 08:51:57","Layout","GetLayoutXml","IN"
"2017-03-03 08:51:57","Layout","GetLayoutXml","OUT"
"2017-03-03 08:51:57","layout","TimeLine","Permission Granted to View MediaID: 

30684d357508b04cd0e8716168a16496"
"2017-03-03 08:51:57","timeline","","<errormsg>Undefined index: link</errormsg>
<errornum>8</errornum>
<errortype>Notice</errortype>
<scriptname>D:\Users\user\XAMPP\htdocs\xibo\xibo-cms-

1.7.9\modules\3rdparty\qrcode.php</scriptname>
<scriptlinenum>3</scriptlinenum>
"
"2017-03-03 08:51:57","timeline","","Module created with MediaID: 30684d357508b04cd0e8716168a16496 LayoutID: 5 and RegionID: 1130358aac4365e4e3"
"2017-03-03 08:51:57","Layout","GetLayoutXml","IN"
"2017-03-03 08:51:57","Layout","GetLayoutXml","OUT"
"2017-03-03 08:51:57","module","SetMediaInformation","Existing Assigned Media XML is: \n <?xml version="1.0"?

>
<root><media id="30684d357508b04cd0e8716168a16496" type="cab" render="html" duration="6000" lkid="" 

userId="1" schemaVersion="1">
                            

<options><name>CallABikeTest</name><latitude>50.1009606</latitude><longitude>8.63961</longitude><radius>500</r

adius><providernetwork>2</providernetwork><duration>6000</duration><updateInterval>1</updateInterval></options

>
                            <raw/>
                    </media></root>
"
"2017-03-03 08:51:57","Module","GetName","Module name returned for MediaID: 30684d357508b04cd0e8716168a16496 

is "
"2017-03-03 08:51:57","Layout","GetLayoutXml","IN"
"2017-03-03 08:51:57","Layout","GetLayoutXml","OUT"
"2017-03-03 08:51:57","timeline","","<errormsg>Undefined index: link</errormsg>
<errornum>8</errornum>
<errortype>Notice</errortype>
<scriptname>D:\Users\user\XAMPP\htdocs\xibo\xibo-cms-

1.7.9\modules\3rdparty\qrcode.php</scriptname>
<scriptlinenum>3</scriptlinenum>
"
"2017-03-03 08:51:57","timeline","","Module created with MediaID: 30684d357508b04cd0e8716168a16496 LayoutID: 5 

and RegionID: 1130358aac4365e4e3"
"2017-03-03 08:51:57","Layout","GetLayoutXml","IN"
"2017-03-03 08:51:57","Layout","GetLayoutXml","OUT"
"2017-03-03 08:51:57","module","SetMediaInformation","Existing Assigned Media XML is: \n <?xml version="1.0"?

>
<root><media id="30684d357508b04cd0e8716168a16496" type="cab" render="html" duration="6000" lkid="" 

userId="1" schemaVersion="1">
                            

<options><name>CallABikeTest</name><latitude>50.1009606</latitude><longitude>8.63961</longitude><radius>500</r

adius><providernetwork>2</providernetwork><duration>6000</duration><updateInterval>1</updateInterval></options

>
                            <raw/>
                    </media></root>
"
"2017-03-03 08:51:57","module","","Creating new module with MediaID: 30684d357508b04cd0e8716168a16496 

LayoutID: 5 and RegionID: 1130358aac4365e4e3"
"2017-03-03 08:51:57","module","","<errormsg>Undefined index: link</errormsg>
<errornum>8</errornum>
<errortype>Notice</errortype>
<scriptname>D:\Users\user\XAMPP\htdocs\xibo\xibo-cms-1.7.9\modules\3rdparty\qrcode.php</scriptname>
<scriptlinenum>3</scriptlinenum>
"
"2017-03-03 08:51:55","layout","","Loading permissions for layoutid 5"
"2017-03-03 08:51:55","layout","","Loading permissions for layoutid 5"
"2017-03-03 08:51:55","layout","IsValid","[IN]"
"2017-03-03 08:51:55","Layout","GetLayoutXml","IN"
"2017-03-03 08:51:55","Layout","GetLayoutXml","OUT"
"2017-03-03 08:51:55","timeline","","<errormsg>Undefined index: link</errormsg>
<errornum>8</errornum>
<errortype>Notice</errortype>
<scriptname>D:\Users\user\XAMPP\htdocs\xibo\xibo-cms-

1.7.9\modules\3rdparty\qrcode.php</scriptname>
<scriptlinenum>3</scriptlinenum>
"
"2017-03-03 08:51:55","timeline","","Module created with MediaID: 30684d357508b04cd0e8716168a16496 LayoutID: 5 

and RegionID: 1130358aac4365e4e3"
"2017-03-03 08:51:55","Layout","GetLayoutXml","IN"
"2017-03-03 08:51:55","Layout","GetLayoutXml","OUT"
"2017-03-03 08:51:55","module","SetMediaInformation","Existing Assigned Media XML is: \n <?xml version="1.0"?

>
<root><media id="30684d357508b04cd0e8716168a16496" type="cab" render="html" duration="6000" lkid="" 

userId="1" schemaVersion="1">
                            

<options><name>CallABikeTest</name><latitude>50.1009606</latitude><longitude>8.63961</longitude><radius>500</r

adius><providernetwork>2</providernetwork><duration>6000</duration><updateInterval>1</updateInterval></options

>
                            <raw/>
                    </media></root>
"
"2017-03-03 08:51:55","module","","Creating new module with MediaID: 30684d357508b04cd0e8716168a16496 

LayoutID: 5 and RegionID: 1130358aac4365e4e3"
"2017-03-03 08:51:55","module","","<errormsg>Undefined index: link</errormsg>
<errornum>8</errornum>
<errortype>Notice</errortype>
<scriptname>D:\Users\user\XAMPP\htdocs\xibo\xibo-cms-1.7.9\modules\3rdparty\qrcode.php</scriptname>
<scriptlinenum>3</scriptlinenum>
"
"2017-03-03 08:51:55","module","","Module created with MediaID: 30684d357508b04cd0e8716168a16496 LayoutID: 5 

and RegionID: 1130358aac4365e4e3"
"2017-03-03 08:51:55","Layout","GetLayoutXml","IN"
"2017-03-03 08:51:55","Layout","GetLayoutXml","OUT"
"2017-03-03 08:51:55","module","SetMediaInformation","Existing Assigned Media XML is: \n <?xml version="1.0"?

>
<root><media id="30684d357508b04cd0e8716168a16496" type="cab" render="html" duration="6000" lkid="" 

userId="1" schemaVersion="1">
                            

<options><name>CallABikeTest</name><latitude>50.1009606</latitude><longitude>8.63961</longitude><radius>500</r

adius><providernetwork>2</providernetwork><duration>6000</duration><updateInterval>1</updateInterval></options

>
                            <raw/>
                    </media></root>
"
"2017-03-03 08:51:49","Userdata","entries","SQL: 
              SELECT `user`.userId, userName, userTypeId, 

loggedIn, email, homePage, lastAccessed, newUserWizard, retired, `userGroups`.groupId, 

`userGroups`.libraryQuota
                FROM `user`
                  LEFT OUTER JOIN (
                    

SELECT `group`.groupId, `group`.libraryQuota, `lkusergroup`.userId
                      FROM `lkusergroup`
     

                   INNER JOIN `group`
                        ON `group`.groupId = `lkusergroup`.groupId
        

                  AND `group`.isUserSpecific = 1
                  ) userGroups
                  ON 

userGroups.userId = `user`.userId
               WHERE 1 = 1
             AND user.retired = :retired ORDER BY 

username. Params: array (
  'retired' => 0,
)."
"2017-03-03 08:51:30","layout","","Loading permissions for layoutid 5"
"2017-03-03 08:51:30","layout","IsValid","[IN]"
"2017-03-03 08:51:30","Layout","GetLayoutXml","IN"
"2017-03-03 08:51:30","Layout","GetLayoutXml","OUT"
"2017-03-03 08:51:30","timeline","","<errormsg>Undefined index: link</errormsg>
<errornum>8</errornum>
<errortype>Notice</errortype>
<scriptname>D:\Users\user\XAMPP\htdocs\xibo\xibo-cms-1.7.9\modules\3rdparty\qrcode.php</scriptname>
<scriptlinenum>3</scriptlinenum>
"
"2017-03-03 08:51:30","timeline","","Module created with MediaID: 30684d357508b04cd0e8716168a16496 LayoutID: 5 

and RegionID: 1130358aac4365e4e3"
"2017-03-03 08:51:30","Layout","GetLayoutXml","IN"
"2017-03-03 08:51:30","Layout","GetLayoutXml","OUT"
"2017-03-03 08:51:30","module","SetMediaInformation","Existing Assigned Media XML is: \n <?xml version="1.0"?

>
<root><media id="30684d357508b04cd0e8716168a16496" type="cab" render="html" duration="6000" lkid="" 

userId="1" schemaVersion="1">
                            

<options><name>CallABikeTest</name><latitude>50.1009606</latitude><longitude>8.63961</longitude><radius>500</r

adius><providernetwork>2</providernetwork><duration>6000</duration><updateInterval>1</updateInterval></options

>
                            <raw/>
                    </media></root>
"
"2017-03-03 08:51:30","module","","Creating new module with MediaID: 30684d357508b04cd0e8716168a16496 

LayoutID: 5 and RegionID: 1130358aac4365e4e3"
"2017-03-03 08:51:30","module","","<errormsg>Undefined index: link</errormsg>
<errornum>8</errornum>
<errortype>Notice</errortype>
<scriptname>D:\Users\user\XAMPP\htdocs\xibo\xibo-cms-1.7.9\modules\3rdparty\qrcode.php</scriptname>
<scriptlinenum>3</scriptlinenum>
"
"2017-03-03 08:51:30","module","","Module created with MediaID: 30684d357508b04cd0e8716168a16496 LayoutID: 5 

and RegionID: 1130358aac4365e4e3"
"2017-03-03 08:51:30","Layout","GetLayoutXml","IN"
"2017-03-03 08:51:30","Layout","GetLayoutXml","OUT"
"2017-03-03 08:51:30","module","SetMediaInformation","Existing Assigned Media XML is: \n <?xml version="1.0"?

>
<root><media id="30684d357508b04cd0e8716168a16496" type="cab" render="html" duration="6000" lkid="" 

userId="1" schemaVersion="1">
                            

<options><name>CallABikeTest</name><latitude>50.1009606</latitude><longitude>8.63961</longitude><radius>500</r

adius><providernetwork>2</providernetwork><duration>6000</duration><updateInterval>1</updateInterval></options

>
                            <raw/>
                    </media></root>
"
"2017-03-03 08:51:29","","","Login with referring page: p=layout&modify=true&layoutid=5"
"2017-03-03 08:51:29","layout","","Loading permissions for layoutid 5"

What logging did you add? I don’t see anything in there that isn’t standard logging?

"2017-03-03 08:52:03","module","","<errormsg>Undefined index: link</errormsg>
<errornum>8</errornum>
<errortype>Notice</errortype>
<scriptname>D:\Users\user\XAMPP\htdocs\xibo\xibo-cms-1.7.9\modules\3rdparty\qrcode.php</scriptname>
<scriptlinenum>3</scriptlinenum>

This is very suspicious, can you momentarily not include the other two files at the top?

I used the Report Fault function in your CMS. Ok I can try that.

You are writing a custom module - there isn’t any issue with our code (well not in this case anyway :slight_smile:) . What I mean is that you need to add more logging by writing log statements in your code, so that we can try to figure out the problem.

--------------------------------------
LOG Dump
--------------------------------------
Date,Page,Function,Message
"2017-03-03 09:11:20","module","","Creating new module with MediaID:  LayoutID: 5 and RegionID: 1130358aac4365e4e3"
"2017-03-03 09:11:20","module","","Module created with MediaID:  LayoutID: 5 and RegionID: 1130358aac4365e4e3"
"2017-03-03 09:11:20","module","","<errormsg>Trying to get property of non-object</errormsg>
<errornum>8</errornum>
<errortype>Notice</errortype>
<scriptname>D:\Users\SaschaLautenschlaege\XAMPP\htdocs\xibo\xibo-cms-1.7.9\modules\cab.module.php</scriptname>
<scriptlinenum>358</scriptlinenum>
"
"2017-03-03 09:11:10","module","","Creating new module with MediaID: 30684d357508b04cd0e8716168a16496 LayoutID: 5 and RegionID: 1130358aac4365e4e3"
"2017-03-03 09:11:10","module","","Module created with MediaID: 30684d357508b04cd0e8716168a16496 LayoutID: 5 and RegionID: 1130358aac4365e4e3"
"2017-03-03 09:11:10","Layout","GetLayoutXml","IN"
"2017-03-03 09:11:10","Layout","GetLayoutXml","OUT"
"2017-03-03 09:11:10","module","SetMediaInformation","Existing Assigned Media XML is: \n <?xml version="1.0"?>
<root><media id="30684d357508b04cd0e8716168a16496" type="cab" render="html" duration="6000" lkid="" userId="1" schemaVersion="1">
                            <options><name>CallABikeTest</name><latitude>50.1009606</latitude><longitude>8.63961</longitude><radius>500</radius><providernetwork>2</providernetwork><duration>6000</duration><updateInterval>1</updateInterval></options>
                            <raw/>
                    </media></root>
"
"2017-03-03 09:11:05","Layout","GetLayoutXml","IN"
"2017-03-03 09:11:05","Layout","GetLayoutXml","OUT"
"2017-03-03 09:11:05","timeline","","Module created with MediaID: 30684d357508b04cd0e8716168a16496 LayoutID: 5 and RegionID: 1130358aac4365e4e3"
"2017-03-03 09:11:05","Layout","GetLayoutXml","IN"
"2017-03-03 09:11:05","Layout","GetLayoutXml","OUT"
"2017-03-03 09:11:05","module","SetMediaInformation","Existing Assigned Media XML is: \n <?xml version="1.0"?>
<root><media id="30684d357508b04cd0e8716168a16496" type="cab" render="html" duration="6000" lkid="" userId="1" schemaVersion="1">
                            <options><name>CallABikeTest</name><latitude>50.1009606</latitude><longitude>8.63961</longitude><radius>500</radius><providernetwork>2</providernetwork><duration>6000</duration><updateInterval>1</updateInterval></options>
                            <raw/>
                    </media></root>
"
"2017-03-03 09:11:05","module","","Creating new module with MediaID: 30684d357508b04cd0e8716168a16496 LayoutID: 5 and RegionID: 1130358aac4365e4e3"
"2017-03-03 09:11:05","module","","Module created with MediaID: 30684d357508b04cd0e8716168a16496 LayoutID: 5 and RegionID: 1130358aac4365e4e3"
"2017-03-03 09:11:05","Layout","GetLayoutXml","IN"
"2017-03-03 09:11:05","Layout","GetLayoutXml","OUT"
"2017-03-03 09:11:05","module","SetMediaInformation","Existing Assigned Media XML is: \n <?xml version="1.0"?>
<root><media id="30684d357508b04cd0e8716168a16496" type="cab" render="html" duration="6000" lkid="" userId="1" schemaVersion="1">
                            <options><name>CallABikeTest</name><latitude>50.1009606</latitude><longitude>8.63961</longitude><radius>500</radius><providernetwork>2</providernetwork><duration>6000</duration><updateInterval>1</updateInterval></options>
                            <raw/>
                    </media></root>
"
"2017-03-03 09:11:04","Layout","GetLayoutXml","IN"
"2017-03-03 09:11:04","Layout","GetLayoutXml","OUT"
"2017-03-03 09:11:04","Layout","GetLayoutXml","IN"
"2017-03-03 09:11:04","Layout","GetLayoutXml","OUT"
"2017-03-03 09:11:04","layout","TimeLine","Permission Granted to View MediaID: 30684d357508b04cd0e8716168a16496"
"2017-03-03 09:11:04","timeline","","Module created with MediaID: 30684d357508b04cd0e8716168a16496 LayoutID: 5 and RegionID: 1130358aac4365e4e3"
"2017-03-03 09:11:04","Layout","GetLayoutXml","IN"
"2017-03-03 09:11:04","Layout","GetLayoutXml","OUT"
"2017-03-03 09:11:04","module","SetMediaInformation","Existing Assigned Media XML is: \n <?xml version="1.0"?>
<root><media id="30684d357508b04cd0e8716168a16496" type="cab" render="html" duration="6000" lkid="" userId="1" schemaVersion="1">
                            <options><name>CallABikeTest</name><latitude>50.1009606</latitude><longitude>8.63961</longitude><radius>500</radius><providernetwork>2</providernetwork><duration>6000</duration><updateInterval>1</updateInterval></options>
                            <raw/>
                    </media></root>
"
"2017-03-03 09:11:04","Module","GetName","Module name returned for MediaID: 30684d357508b04cd0e8716168a16496 is "
"2017-03-03 09:11:00","Layout","GetLayoutXml","IN"
"2017-03-03 09:11:00","Layout","GetLayoutXml","OUT"
"2017-03-03 09:11:00","timeline","","Module created with MediaID: 30684d357508b04cd0e8716168a16496 LayoutID: 5 and RegionID: 1130358aac4365e4e3"
"2017-03-03 09:11:00","Layout","GetLayoutXml","IN"
"2017-03-03 09:11:00","Layout","GetLayoutXml","OUT"
"2017-03-03 09:11:00","module","SetMediaInformation","Existing Assigned Media XML is: \n <?xml version="1.0"?>
<root><media id="30684d357508b04cd0e8716168a16496" type="cab" render="html" duration="6000" lkid="" userId="1" schemaVersion="1">
                            <options><name>CallABikeTest</name><latitude>50.1009606</latitude><longitude>8.63961</longitude><radius>500</radius><providernetwork>2</providernetwork><duration>6000</duration><updateInterval>1</updateInterval></options>
                            <raw/>
                    </media></root>
"
"2017-03-03 09:11:00","layout","","Loading permissions for layoutid 5"
"2017-03-03 09:11:00","layout","IsValid","[IN]"
"2017-03-03 09:11:00","module","","Creating new module with MediaID: 30684d357508b04cd0e8716168a16496 LayoutID: 5 and RegionID: 1130358aac4365e4e3"
"2017-03-03 09:11:00","module","","Module created with MediaID: 30684d357508b04cd0e8716168a16496 LayoutID: 5 and RegionID: 1130358aac4365e4e3"
"2017-03-03 09:11:00","Layout","GetLayoutXml","IN"
"2017-03-03 09:11:00","Layout","GetLayoutXml","OUT"
"2017-03-03 09:11:00","module","SetMediaInformation","Existing Assigned Media XML is: \n <?xml version="1.0"?>
<root><media id="30684d357508b04cd0e8716168a16496" type="cab" render="html" duration="6000" lkid="" userId="1" schemaVersion="1">
                            <options><name>CallABikeTest</name><latitude>50.1009606</latitude><longitude>8.63961</longitude><radius>500</radius><providernetwork>2</providernetwork><duration>6000</duration><updateInterval>1</updateInterval></options>
                            <raw/>
                    </media></root>
"
"2017-03-03 09:10:59","layout","","Loading permissions for layoutid 5"
"2017-03-03 09:10:55","Userdata","entries","SQL: 
              SELECT `user`.userId, userName, userTypeId, loggedIn, email, homePage, lastAccessed, newUserWizard, retired, `userGroups`.groupId, `userGroups`.libraryQuota
                FROM `user`
                  LEFT OUTER JOIN (
                    SELECT `group`.groupId, `group`.libraryQuota, `lkusergroup`.userId
                      FROM `lkusergroup`
                        INNER JOIN `group`
                        ON `group`.groupId = `lkusergroup`.groupId
                          AND `group`.isUserSpecific = 1
                  ) userGroups
                  ON userGroups.userId = `user`.userId
               WHERE 1 = 1
             AND user.retired = :retired ORDER BY username. Params: array (
  'retired' => 0,
)."

--------------------------------------
Display Dump
--------------------------------------
DisplayID: 1
Display: BK7N00081022
Default Layout: 0
Logged In: 0
Last Accessed: 1486394387
Interleave: 0
Licensed: 1


--------------------------------------
Settings Dump
--------------------------------------
Setting: MEDIA_DEFAULT - Value:   private

Setting: LAYOUT_DEFAULT - Value:   private

Setting: defaultUsertype - Value:   User

Setting: userModule - Value:   module_user_general.php

Setting: defaultTimezone - Value:   Europe/Berlin

Setting: mail_to - Value:   mail@yoursite.com

Setting: mail_from - Value:   mail@yoursite.com

Setting: jpg_length - Value:   10

Setting: ppt_length - Value:   10

Setting: swf_length - Value:   10

Setting: audit - Value:   audit

Setting: LIBRARY_LOCATION - Value:   D:\Users\user\XAMPP\htdocs\xibo\xibo-cms-1.7.9\pool\

Setting: HELP_BASE - Value:   http://www.xibo.org.uk/manual/en/

Setting: PHONE_HOME - Value:   On

Setting: PHONE_HOME_URL - Value:   http://www.xibo.org.uk/stats/track.php

Setting: PHONE_HOME_DATE - Value:   1486130248

Setting: SERVER_MODE - Value:   Production

Setting: MAINTENANCE_ENABLED - Value:   Off

Setting: MAINTENANCE_EMAIL_ALERTS - Value:   On

Setting: MAINTENANCE_KEY - Value:   changeme

Setting: MAINTENANCE_LOG_MAXAGE - Value:   30

Setting: MAINTENANCE_STAT_MAXAGE - Value:   30

Setting: MAINTENANCE_ALERT_TOUT - Value:   12

Setting: SHOW_DISPLAY_AS_VNCLINK - Value:   

Setting: SHOW_DISPLAY_AS_VNC_TGT - Value:   _top

Setting: MAINTENANCE_ALWAYS_ALERT - Value:   Off

Setting: SCHEDULE_LOOKAHEAD - Value:   On

Setting: REQUIRED_FILES_LOOKAHEAD - Value:   172800

Setting: REGION_OPTIONS_COLOURING - Value:   Media Colouring

Setting: LAYOUT_COPY_MEDIA_CHECKB - Value:   Unchecked

Setting: MAX_LICENSED_DISPLAYS - Value:   0

Setting: LIBRARY_MEDIA_UPDATEINALL_CHECKB - Value:   Unchecked

Setting: USER_PASSWORD_POLICY - Value:   

Setting: USER_PASSWORD_ERROR - Value:   

Setting: MODULE_CONFIG_LOCKED_CHECKB - Value:   Unchecked

Setting: LIBRARY_SIZE_LIMIT_KB - Value:   0

Setting: MONTHLY_XMDS_TRANSFER_LIMIT_KB - Value:   0

Setting: DEFAULT_LANGUAGE - Value:   en_GB

Setting: TRANSITION_CONFIG_LOCKED_CHECKB - Value:   Unchecked

Setting: GLOBAL_THEME_NAME - Value:   default

Setting: DEFAULT_LAT - Value:   51.504

Setting: DEFAULT_LONG - Value:   -0.104

Setting: SCHEDULE_WITH_VIEW_PERMISSION - Value:   No

Setting: SETTING_IMPORT_ENABLED - Value:   1

Setting: SETTING_LIBRARY_TIDY_ENABLED - Value:   1

Setting: SENDFILE_MODE - Value:   Off

Setting: EMBEDDED_STATUS_WIDGET - Value:   

Setting: PROXY_HOST - Value:   

Setting: PROXY_PORT - Value:   0

Setting: PROXY_AUTH - Value:   

Setting: DATE_FORMAT - Value:   Y-m-d H:i

Setting: DETECT_LANGUAGE - Value:   0

Setting: DEFAULTS_IMPORTED - Value:   1

Setting: FORCE_HTTPS - Value:   0

Setting: ISSUE_STS - Value:   0

Setting: STS_TTL - Value:   600

Setting: MAINTENANCE_ALERTS_FOR_VIEW_USERS - Value:   0

Setting: CALENDAR_TYPE - Value:   Gregorian

Setting: DASHBOARD_LATEST_NEWS_ENABLED - Value:   1

Setting: LIBRARY_MEDIA_DELETEOLDVER_CHECKB - Value:   Unchecked

Setting: USE_INTL_DATEFORMAT - Value:   0

Setting: PROXY_EXCEPTIONS - Value:   

Setting: CDN_URL - Value:   


--------------------------------------
Sessions Dump
--------------------------------------
UserAgent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.87 Safari/537.36
RemoteAddress: ::1
Session Data
pagename|s:5:&#34;clock&#34;;token|s:32:&#34;8e5087de4bc1313528ff3d2c0269e344&#34;;token_timeout|i:1488528670;message|s:0:&#34;&#34;;username|s:5:&#34;admin&#34;;usertype|s:1:&#34;1&#34;;layout|a:9:{s:13:&#34;filter_layout&#34;;s:0:&#34;&#34;;s:13:&#34;filter_userid&#34;;i:0;s:14:&#34;filter_retired&#34;;i:0;s:20:&#34;filterLayoutStatusId&#34;;s:1:&#34;1&#34;;s:17:&#34;showDescriptionId&#34;;s:1:&#34;2&#34;;s:8:&#34;showTags&#34;;i:0;s:13:&#34;showThumbnail&#34;;i:1;s:11:&#34;filter_tags&#34;;s:0:&#34;&#34;;s:12:&#34;LayoutFilter&#34;;i:0;}gridToken|s:32:&#34;95a225a2c78c726896c7f1514c2c4ac0&#34;;gridToken_timeout|i:1488528656;timeLineView|s:4:&#34;list&#34;;userid|s:1:&#34;1&#34;;ErrorMessage|s:51:&#34;You do not have permission to edit this assignment.&#34;;
----

Well now I get the error that there is no Object called cabCurl. But thats obvious.

I can call echo or var_dump() in my file if needed.

You can use the Debug static class to log to the Xibo log.

Let me ask another question - why is this error:

"2017-03-03 08:52:03","module","","<errormsg>Undefined index: link</errormsg>
<errornum>8</errornum>
<errortype>Notice</errortype>
<scriptname>D:\Users\user\XAMPP\htdocs\xibo\xibo-cms-1.7.9\modules\3rdparty\qrcode.php</scriptname>
<scriptlinenum>3</scriptlinenum>

Being generated when you Edit the widget?? There isn’t anything I can see in “EditMedia” which would call this file?

So something like that?
Debug::LogEntry('audit', 'layoutid: ' . $this->layoutid . ', regionid: ' . $this->regionid, 'cab', 'EditMedia');

I have no idea why this error is thrown. This is my qrcode.php file:

<?php
	include 'phpqrcode.php';
	$url = $_GET['link'];

	QRcode::png($url);
 ?>

I use GET to pass my url to the QRcode function.

That code will be running always, for every request that touches your module. That is not the way to do it! You can include class/function definitions, but any code that you run should be inside the class flow that we already have in the application. I.e. if you wanted that to run every time you would put it in __construct. Even then it would fail because not every request is a GET request - so you should probably put it only inside the places that send link (which should probably be $_POST requests. And you should sanitize the input in some way.


I’m afraid I think we’ve reached the point where you need to learn a little more about PHP, OOP, protecting your code and/or consider some commercial assistance to get your module working.

I really would like to help you, but I just don’t have the time to understand completely what you are trying to do. Someone else in the Community might be able to help you though.

My qrcode.php isn’t neccesary anymore. I now removed the include. But even then it won’t let me edit. Also I get a new error message.

<errormsg>Trying to get property of non-object</errormsg>
<errornum>8</errornum>
<errortype>Notice</errortype>
<scriptname>D:\Users\user\XAMPP\htdocs\xibo\xibo-cms-1.7.9\modules\cab.module.php</scriptname>
<scriptlinenum>358</scriptlinenum>

I can say that I know PHP well enough. It isn’t possible that I made a mistake again. I triple checked my file against other modules. If you can’t help me now I’ll just give up. But thanks anyways for your help.

EDIT 1:

In line 358 there is:

if (!$this->auth->edit)
        {
            $this->response->SetError('You do not have permission to edit this assignment.');
            $this->response->keepOpen = false;
            return $this->response;
        }

We have come full circle now - the $this->auth object is empty because there are parameters missing from the request. The logging you have added can be moved into __construct so that you can see what those values are when the module executes the auth code.

I’m sure you have triple checked your file - but all of the other module files work OK so there must be something which is not right with your code.

OO PHP is not as easy as just writing a script, like back in the old days :slight_smile: - logging is your friend, you can log after every line if you need to, in order to work out what is missing.

I just discovered that neither layoutid nor regionid are set. Do have a rough idea what part of my code doesn’t work correctly?

Hi,
Firs off all I am not programmer, I am a computer technician.
I have a project for xibo.
I want to read a record from xibo database and use this record for google maps variable. such a longitute and langitute.
Only one problem.
How to read a data from database manualy.
What is this code.
Pls help me. Thank you

Do you have some existing code? If yes can you provide it?
Also the Xibo database shouldn’t be accessed directly but further use the provided functions like GetOption() e.g…
So in my case i can get my values like this: $this->GetOption('longitude')
Didi you store the data you want to receive and if yes how? If you want to extend Xibo’s functionalities you will have to code a module.

Best regards!

I do not have any code that I wrote. I just got google map code from internet. This code works fine. However, I want to read the latitude and longitude values ​​used in this code from the xibo dataset table. Because these values ​​will change every day. I write these values ​​by hand and I want to automatically read the values ​​of this table every day. I could not figure out how to do it.
Here is the google map codu I found on the internet.
But once again I would like to repeat my problem using this code by reading a record from the datatabe.
Thank you very much for your reply.

<!DOCTYPE html>
<html>
<body>

<h1>My First Google Map</h1>

<div id="googleMap" style="width:100%;height:400px;"></div>

<script>
 function myMap() {
var mapProp= {
 center:new google.maps.LatLng(51.508742,-0.120850),
  zoom:5,
};
var map=new google.maps.Map(document.getElementById("googleMap"),mapProp);
}
</script>

<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyBu-//916DdpKAjTmJNIgngS6HL_kDIKU0aU&callback=myMap"></script>
<!--
To use this code on your website, get a free API key from Google.
Read more at: https://www.w3schools.com/graphics/google_maps_basic.asp
-->

</body>
</html>