Closed (fixed)
Project:
RESTWS Alias
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
15 Apr 2015 at 15:30 UTC
Updated:
20 Apr 2015 at 00:47 UTC
Jump to comment: Most recent, Most recent file
Hi - great concept for a module - I get this error when I go to enable it (using drush)
drush en restws_alias
Error: syntax error, unexpected '[' /sites/all/modules/2470461/restws_alias.module, line 71
line 71 reads $format_path['pid'] = path_load($criterion)['pid'];
looking at path_load in the documentation I'm not sure what's up... any help appreciated = thanks!
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | drush en.png | 6.44 KB | jaskaran.nagra |
Comments
Comment #1
jaskaran.nagra commentedHi alibama,
Glad you liked the concept of the module.
I tried to reproduce the error on my machine, and also on one of my servers but everything seems to work perfect.
I have noticed however that I forgot to add pathauto as a dependency. It did not generate the error however. Can yo please try installing it through UI.
I am aware that drush had this issue earlier of reporting false syntax errors. Please see - https://www.drupal.org/node/1948962
Let me know if it still doesn't work for you.
If it works for you, please consider reviewing the sandbox at: https://www.drupal.org/node/2470483
Thanks,
Jask
Comment #2
jaskaran.nagra commentedComment #3
jaskaran.nagra commentedActually, It is not dependent. Without pathauto, the url aliases are not created and this module becomes useless unless you manually create aliases.
But again it doesn't mean that this is dependent on pathauto. Removing dependency from the code.
Comment #4
alibama commentedhi jaskaran.nagra - i'm in the usa - so give me a minute to get back on stuff ;) anyhow - yeah, I've got pathauto installed, and i've tested installing through the regular screen - neither works... fwiw the site i'm working on is dev.bioconnector.virginia.edu and one of the test nodes is dev.bioconnector.virginia.edu/
so http://dev.bioconnector.virginia.edu/node/155.json works ok,
http://dev.bioconnector.virginia.edu/content/bioinformatics-tutorials-se... (the pathauto alias) works, and obviously http://dev.bioconnector.virginia.edu/node/155 works - but not
http://dev.bioconnector.virginia.edu/content/bioinformatics-tutorials-se...
the main issue is just that the module won't enable - anyhow, i'm glad to test other ideas or settings
Comment #5
jaskaran.nagra commentedHi Alibama,
HAHA.... sure, I am sorry about that. I am just too excited to put this module through to full project :)
Okay, do you think it is possible for me to log in to the node and check what's going on?
Also, can you post the list of url aliases from Configuration-> URL alias.
If possible, please post all the error logs regarding this module, if any.
If the node was created before the RestWS Alias module was installed, did you bulk update the aliases?
Let me know and I will fix it asap.
Thanks,
Jask
Comment #6
jaskaran.nagra commentedComment #7
jaskaran.nagra commentedEureka !!
I finally was able to reproduce the error at simplytest.me. I tried on a fresh install on my machine and it was working fine.
Anyhow, simplytest.me gives similar error and I conclude this is a php version syntax problem. My php version allows me to write shorthand codes for objects.
Good News is that since I have reproduced it, I can fix it. Ooh Ohh wait!! I have already :)
You can test it on simplytest.me : http://simplytest.me/project/2470461/7.x-1.0-alpha1
Just click launch, enable the module and then create a new node with some url alias.
It should work!
On your website, you will have to download the latest version of the module ofcourse.
Thanks,
Jask
Comment #8
jaskaran.nagra commentedComment #9
alibama commentedDude - you are awesome - let me know how I can help you get this as a complete module... I'm slammed today with "pesky day job" stuff but will get it running monday + do a review on drupal.org/planet for you :)
rock on
ap
Comment #10
jaskaran.nagra commentedHi alibama,
So pleased to know that it worked for you. Hope you are enjoying the weekend.
It would really help make this module a full project if you can do a review for the sandbox at:
https://www.drupal.org/node/2470483
Also, please set the status to reviewed and tested by community once you have done a manual review.
Then git administrators will make it public. So, if you can just mention that you are/are going to use this in your website, it would be great !!
Cheers mate!
Comment #11
jaskaran.nagra commentedComment #12
alibama commentednot only does it work - I should be putting this in to production on monday - http://dev.bioconnector.virginia.edu/content/introduction-pubmed-online-...
shows a nice example of functionality...
couple ideas for future released = integrate with taxonomy terms, perhaps field collections, perhaps profiles ie entities in general... but whatever, it's working for my primary use case, and I look forward to writing up a review for drupal.org/planet asap
Comment #13
jaskaran.nagra commentedPerfect ! so glad to hear that.
Just saw your review on the project application issue, Thanks a lot for that !!
This module inherently supports any type supported by restws module. So, if restws module provides json for let's say taxonomy terms in future, this module will automatically start supporting it as well :)
Cheers ~