Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC:

Saving filenames, paths with backslashes 30 Dec 2012 18:02 #6308

I'm having a terrible time getting data containing filenames and paths to save properly. I've also had no luck using custom Regex properties, so am seeking some guidance.
    My Problems
  1. The text/string field that uses backslashes is not saving the backslashes to the DB properly.
  2. The RegEx for file does not seem to be correct - it seems to depend on a drive, or perhaps an uploaded file. When setting it in the properties, the test works, but running from the sandbox any kind of valid path or file information failes, so I can't save it.
  3. I've tried the provided file and custom regex, as well as tried using different handler names
    My Requirements (in case it matters):
  • Uploading is not part of the consideration. The component is only storing metadata about files located elsewhere, so this feature is neither needed or allowed.
  • We have to separately store the base file name, the relative path to the file (without the drive), and the relative url
i.e.:
filename:  myvideo.mp4
file path: customervideos\customername\   
file url:  acme/streaming/
(note: no preceding backslash allowed, but trailing backslash required)

This may seem strange, but with the aliases, virtual folders, cross domains, and a bunch of reasons that don't matter here, the only thing that remains consistent is the base file name, with URL information varying on where and how the file is used and the physical location depending on which SAN is currently in use.

Please Log in or Create an account to join the conversation.

Re: Saving filenames, paths with backslashes 04 Jan 2013 20:22 #6350

  • JoomGuy
  • JoomGuy's Avatar
  • Offline
  • Moderator
  • Moderator
  • Joomla Enthusiast, Lover of Cooking
  • Posts: 1115
  • Thank you received: 195
Could you post your regex and handler details? I reckon there's an issue with the slashes in the regex or some missing 'valid' chars.

A couple of questions:
  1. have you any JS errors?
  2. Version 2.0b or 1.5? Please post your config?
Gez
Need help with your Cook/Joomla Project? . PM me to find out what I can help with. NO time wasters please!!!

Please Log in or Create an account to join the conversation.

Re: Saving filenames, paths with backslashes 04 Jan 2013 20:32 #6351

Don't have it installed yet. Just try a new component with the builder and use a string field to contain a file name or a folder name. Using the validation popups in the builder, you can specify a file name, and test it there. When you run the component in the sandbox, the regex fails (or at least the validation errors appear when a valid file name is put in there)

Please Log in or Create an account to join the conversation.

Re: Saving filenames, paths with backslashes 04 Jan 2013 20:37 #6352

  • JoomGuy
  • JoomGuy's Avatar
  • Offline
  • Moderator
  • Moderator
  • Joomla Enthusiast, Lover of Cooking
  • Posts: 1115
  • Thank you received: 195
I don't have FF to access builder ATM. If I can see your config details and the regex I should be able to help though...

Can you grab it from the builder?
Need help with your Cook/Joomla Project? . PM me to find out what I can help with. NO time wasters please!!!

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
Time to create page: 0.063 seconds

Awards for the best Joomla app. This product is gonna win an award for this amazing job. Cook Self Service is the the best application from all over the Joomla universe ! It brings Joomla to a professional level really advanced for developers. It is a real fun to develop with it. The ACL part and security checks implementation are just... so much hours saved. I can now concentrate myself more on the design part and the creative works. Thank you so much. Guys I offer you all my congratulation ! Keep up the works because Joomla is needing it to increase the quality of extensions availables on the JED. I also learned a lot because I can see how to code at the proper place and I found all my answers reading the forum.
lack_hanson (JED)
          

Get Started