hannesmannerheim / qvitter

mirror. moved to https://git.gnu.io/h2p/Qvitter, send merge requests and issues there
https://git.gnu.io/h2p/Qvitter
GNU Affero General Public License v3.0
86 stars 26 forks source link

Problem getting route for plugins/Qvitter/locale/de.json - No match for path "plugins/Qvitter/locale/de.json" #230

Closed LiohMoeller closed 9 years ago

LiohMoeller commented 9 years ago

I have installed the plugin as described in the Readme, but it does not seem to load correctly. I got an error like:

Problem getting route for plugins/Qvitter/locale/de.json - No match for path "plugins/Qvitter/locale/de.json"

The files are in the correct place and the config has been made as suggested. Do I have to restart queuemanager or something else to make it work?

hannesmannerheim commented 9 years ago

url to the instance?

LiohMoeller commented 9 years ago

https://gnusocial.ch but I have it de-activated as it does not work. Should I activate it again for you to check?

hannesmannerheim commented 9 years ago

yes, please do!

LiohMoeller commented 9 years ago

Done, there is not much to see, though as it seems to fail to load.

hannesmannerheim commented 9 years ago

thanks, you can deactivate it now

hannesmannerheim commented 9 years ago

hm, i wonder what the problem is. if you type https://gnusocial.ch/local/plugins/Qvitter/locale/de.json into your browser it should find the .json file, but it doesn't...

hannesmannerheim commented 9 years ago

my first thought was that it might be looking for the language file in /plugins/Qvitter instead of /local/plugins/Qvitter, but since that was not the case, i don't know.

either the files doesn't exist, or there's some weird server setting regarding .json files, or there a problem in the .htaccess, or in lib/router.php... but qvitter is tested and working with the latest gnusocial nightly.

hannesmannerheim commented 9 years ago

now suddenly https://gnusocial.ch/local/plugins/Qvitter/locale/de.json is working!

LiohMoeller commented 9 years ago

Yes, I had to add a mimetype to the nginx configuration (included defaults now for this site). Now I got an error:

Failed to get request GET /api/qvitter/allfollowing/marcus.json?

It is looking for /srv/gnusocial/api/qvitter/allfollowing/marcus.json which does not exist.

hannesmannerheim commented 9 years ago

still some server setting with json files i think

https://gnusocial.ch/api/statuses/public_timeline.xml works https://gnusocial.ch/api/statuses/public_timeline.json doesn't work

LiohMoeller commented 9 years ago

For me the first one does not work either.

Do I perhaps have to configure a value for:

$config['site']['qvitter']['urlshortenerapiurl'] = 'http://qttr.at/yourls-api.php';

I am not sure what would be the correct value here. There is no yourls-api.php script available in my nightly checkout.

hannesmannerheim commented 9 years ago

that's nothing to do with it.

the api files doesn't exist anywhere since they are created dynamically. maybe nginx needs to be set to send .json files through php somehow. i've never used nginx so i don't know how that works

LiohMoeller commented 9 years ago

hmm. Do I still have to replace apiauthaction.php on nightly?

hannesmannerheim commented 9 years ago

nope

btw this is a problem even if you're not running qvitter, if someone wants to use a client for gnusocial.ch that uses the json-api

hannesmannerheim commented 9 years ago

compare e.g. https://gnusocial.ch/local/plugins/Qvitter/locale/idontexist.json with https://gnusocial.no/local/plugins/Qvitter/locale/idontexist.json

i don't think json files are sent to index.php for gnusocial's internal routing.

maybe this rule in .htaccess doesn't match json files, for some reason: RewriteRule (.*) index.php?p=$1 [L,QSA]

hannesmannerheim commented 9 years ago

but i'm just guessing...

hannesmannerheim commented 9 years ago

they apparently have nginx working on micro.fragdev.com: http://fragdev.com/blog/gnusocial-on-nginx-with-php-fpm

the "Perform URL rewriting if a file doesn't exist" part sounds interesting

hannesmannerheim commented 9 years ago

ohhh, my memory should be better, but @knuthollund has solved exactly this before: https://quitter.se/notice/3487990

LiohMoeller commented 9 years ago

At least https://gnusocial.ch/api/statuses/public_timeline.json works for now.

Now I see errors like this in the log:

2015-07-10 11:43:15 LOG_ERR: [gnusocial.ch:14413.e2552777 GET /api/statuses/public_timeline.json?t=1436528575732] ServerErrorAction: 400 [QvitterNotification] DB_DataObject error []: DB Error: no such table

0 /srv/gnusocial/extlib/DB/DataObject.php(2656): Memcached_DataObject->raiseError(Object(DB_Error))

1 /srv/gnusocial/classes/Memcached_DataObject.php(637): DB_DataObject->_query('SELECT ntype ,...')

2 /srv/gnusocial/extlib/DB/DataObject.php(451): Memcached_DataObject->_query('SELECT ntype ,...')

3 /srv/gnusocial/classes/GS_DataObject.php(134): DB_DataObject->find(false)

4 /srv/gnusocial/local/plugins/Qvitter/QvitterPlugin.php(911): GS_DataObject->find()

5 [internal function]: QvitterPlugin->onEndSetApiUser(Object(User))

6 /srv/gnusocial/lib/event.php(105): call_user_func_array(Array, Array)

7 /srv/gnusocial/lib/apiauthaction.php(97): Event::handle('EndSetApiUser', Array)

8 /srv/gnusocial/actions/apitimelinepublic.php(159): ApiAuthAction->prepare(Array)

9 /srv/gnusocial/lib/action.php(122): ApiTimelinePublicAction->prepare(Array)

10 /srv/gnusocial/lib/action.php(101): Action->execute(Array)

11 [internal function]: Action::run(Array)

12 /srv/gnusocial/index.php(316): call_user_func('ApiTimelinePubl...', Array)

13 /srv/gnusocial/index.php(330): main()

14 {main}

hannesmannerheim commented 9 years ago

maybe you've disabled "schemacheck" in your config? you have to run that so that qvitter's tables are created

LiohMoeller commented 9 years ago

Yeah, after running php ./scripts/checkschema.php it finally works. Thanks a lot!

hannesmannerheim commented 9 years ago

:))