Hi Giovanni,
I ran into a problem with your language_redirect extension. I am using
radiant 0.6RC2 and the extension directly from
http://svn1.hosted-projects.com/medlar/language_redirect_extension/language_redirect/
).
Ruby complains about a missing method or local variable ‘config’ (see
error below). If I look into
/vendor/extensions/language_redirect/app/models/language_redirect_page.rb
I can see the usage of config, but no definition.
What am I missing?
Thanks
Nancy
— error below.
NameError (undefined local variable or method `config’ for
#LanguageRedirectPage:0x2b4781d13578):
/usr/lib/ruby/gems/1.8/gems/radiant-0.6.0/vendor/rails/activerecord/lib/active_record/base.rb:1861:in
`method_missing’
/home/rails-apps/radiant/vendor/extensions/language_redirect/app/models/language_redirect_page.rb:47:in
`location_map’
/home/rails-apps/radiant/vendor/extensions/language_redirect/app/models/language_redirect_page.rb:35:in
`location’
/usr/lib/ruby/gems/1.8/gems/radiant-0.6.0/vendor/rails/activerecord/lib/active_record/base.rb:1941:in
`find’
/home/rails-apps/radiant/vendor/extensions/language_redirect/app/models/language_redirect_page.rb:34:in
`each’
I haven’t looked through my code since I wrote it, but if I remember
correctly config is the config page part.
Try using the extension on a page with a config page part and let me
know.
Bye,
Giovanni
2007/3/26, Nancy C. [email protected]:
Hmmm, I tried that with the following content:
de: /de/
*: /en/
but no change.
Best regards,
N.
Giovanni I. schrieb:
I’ll check the sources, maybe there are some differences between the
version I wrote it for and the current release.
I’ll let you know asap.
2007/3/26, Nancy C. [email protected]:
Ok, I updated the extension, now it should work. Let me know
2007/3/26, Giovanni I. [email protected]:
That’s what I did, thanks
You used YAML while I simply made a hash out of it. BTW what’t the
best way to store configs now?
2007/3/26, Sean C. [email protected]:
Giovanni I. wrote:
That’s what I did, thanks
You used YAML while I simply made a hash out of it. BTW what’t the
best way to store configs now?
Write a full blown extension for it? For example, the mailer extension
would probably be much better if it created a “Mailers” tab where you
could create custom mailer objects just like any other object in
Radiant. Then the extension wouldn’t need to use a custom page type. The
radius tags could be global which would allow them to be used on any
page.
–
John L.
http://wiseheartdesign.com
About 3-4 months ago, the core team deprecated the ‘config’ part. If
you still want to use it, feel free to nab the code for it from the
mailer extension. I believe it’s toward the top of mailer_page.rb.
Sean
John you’re right, as usual, any pointers to examples of full blown
extensions to get inspiration from? I stopped following the
development lately (my fault) and I need some pointer to catch up.
2007/3/26, John W. Long [email protected]:
Wow! You guys are so great! I go outside and sit in the sunshine for
an hour, do my grocery shopping and come back and you have solved almost
every problem I have in the world. The ruby error message is gone and
is replaced by a “302 found” in my browser.
Hope this helps.
Best regards,
Nancy
Giovanni I. schrieb:
Giovanni I. wrote:
John you’re right, as usual, any pointers to examples of full blown
extensions to get inspiration from? I stopped following the
development lately (my fault) and I need some pointer to catch up.
The ldap extension uses a lot of the new features that are available for
extensions:
http://dev.radiantcms.org/radiant/browser/branches/mental/extensions/ldap
See also:
http://dev.radiantcms.org/radiant/wiki/Extensions
–
John L.
http://wiseheartdesign.com
Giovanni - it works perfectly! Thanks a million for sharing your
expertise.
Best regards,
Nancy
Giovanni I. schrieb:
Expertise doesn’t really suit me, keep that word for people like John or
Sean
2007/3/27, Nancy C. [email protected]:
302 is a redirection. I tried the extension on a clean radiant install
and it worked fine. Now to be sure it works create a blank config page
part and put the following lines:
*:/something
de:/something
en:/something
no spaces or newlines before or after.
2007/3/26, Nancy C. [email protected]: