{"action":"created","issue":{"url":"https://api.github.com/repos/RSS-Bridge/rss-bridge/issues/899","repository_url":"https://api.github.com/repos/RSS-Bridge/rss-bridge","labels_url":"https://api.github.com/repos/RSS-Bridge/rss-bridge/issues/899/labels{/name}","comments_url":"https://api.github.com/repos/RSS-Bridge/rss-bridge/issues/899/comments","events_url":"https://api.github.com/repos/RSS-Bridge/rss-bridge/issues/899/events","html_url":"https://github.com/RSS-Bridge/rss-bridge/issues/899","id":377077146,"node_id":"MDU6SXNzdWUzNzcwNzcxNDY=","number":899,"title":"Q: queriedContext is returing the same value","user":{"login":"kaistian","id":1446426,"node_id":"MDQ6VXNlcjE0NDY0MjY=","avatar_url":"https://avatars2.githubusercontent.com/u/1446426?v=4","gravatar_id":"","url":"https://api.github.com/users/kaistian","html_url":"https://github.com/kaistian","followers_url":"https://api.github.com/users/kaistian/followers","following_url":"https://api.github.com/users/kaistian/following{/other_user}","gists_url":"https://api.github.com/users/kaistian/gists{/gist_id}","starred_url":"https://api.github.com/users/kaistian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kaistian/subscriptions","organizations_url":"https://api.github.com/users/kaistian/orgs","repos_url":"https://api.github.com/users/kaistian/repos","events_url":"https://api.github.com/users/kaistian/events{/privacy}","received_events_url":"https://api.github.com/users/kaistian/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-11-03T17:47:39Z","updated_at":"2018-11-05T10:50:24Z","closed_at":"2018-11-04T07:45:16Z","author_association":"NONE","body":"I'm trying to create a new bridge but having some problems with queriedContext as it always returning the first value no matter which one I press.\r\n\r\nThe code I'm running\r\n```php\r\n<?php\r\nclass NSMTestBridge extends BridgeAbstract {\r\n\r\n        const MAINTAINER = 'kaistian';\r\n        const NAME = 'Nasjonal sikkerhetsmyndighet Test';\r\n        const URI = 'https://nsm.stat.no';\r\n        const DESCRIPTION = 'Return articles on various categories.';\r\n        const PARAMETERS = array(\r\n                'Aktuelt' => array(),\r\n                'Sikkerhetsbloggen' => array()\r\n        );\r\n\r\n        public function collectData(){\r\n                debugMessage('queriedContext: ' . $this->queriedContext);\r\n                switch($this->queriedContext) {\r\n                        case 'Aktuelt':\r\n                                $html = getSimpleHTMLDOM($this->getURI() . '/aktuelt/')\r\n                                        or returnServerError('Could not request NSM Aktuelt');\r\n                                debugMessage('From Aktuelt');\r\n                                break;\r\n                        case 'Sikkerhetsbloggen':\r\n                                $html = getSimpleHTMLDOM($this->getURI() . '/blogg/')\r\n                                        or returnServerError('Could not request NSM Sikkerhetsbloggen');\r\n                                debugMessage('From Blogg');\r\n                                break;\r\n                        default:\r\n                                returnClientError('Invalid context: ' . $this->queriedContext);\r\n                }\r\n        }\r\n}\r\n\r\n```\r\n\r\nThis show \"Aktuelt\" and \"Sikkerhetsbloggen\" in the UI, but no matter what queriedContext only contains \"Aktuelt\".\r\n\r\nThe log when I press Plaintext under \"Aktuelt\"\r\n```\r\n[Sat Nov 03 18:04:56.288312 2018] [:error] [pid 5958] [client 192.168.1.114:35838] : class <no-class>-> - queriedContext: Aktuelt, referer:\r\n[Sat Nov 03 18:04:56.674795 2018] [:error] [pid 5958] [client 192.168.1.114:35838] : class <no-class>-> - From Aktuelt, referer:\r\n```\r\n\r\nThe Apache log when I press Plaintext under \"Sikkerhetsbloggen\"\r\n```\r\n[Sat Nov 03 18:05:04.865916 2018] [:error] [pid 5645] [client 192.168.1.114:35842] : class <no-class>-> - queriedContext: Aktuelt, referer:\r\n[Sat Nov 03 18:05:05.084253 2018] [:error] [pid 5645] [client 192.168.1.114:35842] : class <no-class>-> - From Aktuelt, referer:\r\n```\r\nI'm running the latest commit from master branch with debug on.\r\n\r\nAny help in solving this is much appreciated."},"comment":{"url":"https://api.github.com/repos/RSS-Bridge/rss-bridge/issues/comments/435832631","html_url":"https://github.com/RSS-Bridge/rss-bridge/issues/899#issuecomment-435832631","issue_url":"https://api.github.com/repos/RSS-Bridge/rss-bridge/issues/899","id":435832631,"node_id":"MDEyOklzc3VlQ29tbWVudDQzNTgzMjYzMQ==","user":{"login":"LogMANOriginal","id":5776685,"node_id":"MDQ6VXNlcjU3NzY2ODU=","avatar_url":"https://avatars1.githubusercontent.com/u/5776685?v=4","gravatar_id":"","url":"https://api.github.com/users/LogMANOriginal","html_url":"https://github.com/LogMANOriginal","followers_url":"https://api.github.com/users/LogMANOriginal/followers","following_url":"https://api.github.com/users/LogMANOriginal/following{/other_user}","gists_url":"https://api.github.com/users/LogMANOriginal/gists{/gist_id}","starred_url":"https://api.github.com/users/LogMANOriginal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LogMANOriginal/subscriptions","organizations_url":"https://api.github.com/users/LogMANOriginal/orgs","repos_url":"https://api.github.com/users/LogMANOriginal/repos","events_url":"https://api.github.com/users/LogMANOriginal/events{/privacy}","received_events_url":"https://api.github.com/users/LogMANOriginal/received_events","type":"User","site_admin":false},"created_at":"2018-11-05T10:50:24Z","updated_at":"2018-11-05T10:50:24Z","author_association":"MEMBER","body":"Your solution is correct, RSS-Bridge needs distinct parameters between categories. A list is the best way to go about it :+1: \r\n\r\nFind more information on `PARAMETERS` on the [Wiki](https://github.com/RSS-Bridge/rss-bridge/wiki/const-PARAMETERS). I just added a comment regarding multiple contexts with the same set of parameters, which is not allowed in RSS-Bridge."}}
{"actor":{"display_login":"LogMANOriginal"}}