WebsiteBaker Logo
  • *
  • Templates
  • Help
  • Add-ons
  • Download
  • Home
*
Welcome, Guest. Please login or register.

Login with username, password and session length
 

News


WebsiteBaker 2.13.6 is now available!


Will it continue with WB? It goes on! | Geht es mit WB weiter? Es geht weiter!
https://forum.websitebaker.org/index.php/topic,32340.msg226702.html#msg226702


The forum email address board@websitebaker.org is working again
https://forum.websitebaker.org/index.php/topic,32358.0.html


R.I.P Dietmar (luisehahne) and thank you for all your valuable work for WB
https://forum.websitebaker.org/index.php/topic,32355.0.html


* Support WebsiteBaker

Your donations will help to:

  • Pay for our dedicated server
  • Pay for domain registration
  • and much more!

You can donate by clicking on the button below.


  • Home
  • Help
  • Search
  • Login
  • Register

  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.11.x) »
  • Modules (Moderator: Boudi) »
  • Drag and Drop not working in OFA when modulename contains hyphens
  • Print
Pages: [1]   Go Down

Author Topic: Drag and Drop not working in OFA when modulename contains hyphens  (Read 16075 times)

Offline astricia

  • Posts: 783
  • Gender: Female
    • netSchmiede24
Drag and Drop not working in OFA when modulename contains hyphens
« on: October 31, 2018, 09:04:56 AM »
Just noticed this bug - when the name for an OneForAll-module contains a hyphen (-), the Drag and Drop function for Fields and Entries does not work .... ! Anybody can confirm?

Astrid
Logged

Offline dbs

  • Betatester
  • **
  • Posts: 8914
  • Gender: Male
  • tioz4ever
    • WebsiteBaker - jQuery-Plugins - Module - Droplets - Tests
Re: Drag and Drop not working in OFA when modulename contains hyphens
« Reply #1 on: October 31, 2018, 10:23:10 AM »
Can't install a module with modulname and directoryname "one-for-all".
Invalid chars.
Logged
https://onkel-franky.de

Offline astricia

  • Posts: 783
  • Gender: Female
    • netSchmiede24
Re: Drag and Drop not working in OFA when modulename contains hyphens
« Reply #2 on: October 31, 2018, 10:51:02 AM »
Hmm... in the info.php it says, that hyphens and underscores are allowed. And I could install it. And it seemed to work fine. Until I tried to change the order of some fields....
Logged

Offline dbs

  • Betatester
  • **
  • Posts: 8914
  • Gender: Male
  • tioz4ever
    • WebsiteBaker - jQuery-Plugins - Module - Droplets - Tests
Re: Drag and Drop not working in OFA when modulename contains hyphens
« Reply #3 on: October 31, 2018, 11:29:58 AM »
Dietmar will have a look. But today some problems with internet (Unitymedia).
Logged
https://onkel-franky.de

Offline astricia

  • Posts: 783
  • Gender: Female
    • netSchmiede24
Re: Drag and Drop not working in OFA when modulename contains hyphens
« Reply #4 on: October 31, 2018, 11:41:07 AM »
And some other strange behaviour:

When I have two sections of the same OFA module - and I call them via SectionPicker on another page - then the first one will be in the correct order, the second one will be in reversed order! Why is that???

Noch mal auf Deutsch, weil es vielleicht sonst zu kompliziert ist: Ich habe zwei Abschnitte des gleichen OFA-Moduls auf verschiedenen Seiten. Auf einer Übersichtsseite rufe ich diese beiden Abschnitte mit dem SectionPicker auf. Der erste Abschnitt wird genauso dargestellt wie auf der Original-Seite. Aber beim zweiten Abschnitt ist die Reihenfolge vertauscht - das letzte Element steht oben, und das erste unten. Wieso???

LG,
Astrid
Logged

Offline DarkViper

  • Forum administrator
  • *****
  • Posts: 3087
  • Gender: Female
Re: Drag and Drop not working in OFA when modulename contains hyphens
« Reply #5 on: October 31, 2018, 11:44:02 AM »
it's a rule and not a bug.
Quote from: https://secure.php.net/manual/en/language.variables.basics.php
Variable names follow the same rules as other labels in PHP. A valid variable name starts with a letter or underscore, followed by any number of letters, numbers, or underscores. As a regular expression, it would be expressed thus: '[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*'
Unfortunately, I do not know OFA to the last detail but only from a short review of the code. Especially not the JS parts.
However, I have seen that in different places the module name is also used as a variable name. As well as table names and field names in the database.
At least in PHP are hyphens in variable names not allowed (see Quote). Likewise, mySql can cause problems in strict mode. Also, I can vaguely remember that JS has several problems here too.
The simplest and most important solution is not to use hyphens in module names. There are absolutely no factual reasons for their use.

Manuela
Logged
Der blaue Planet - er ist nicht unser Eigentum - wir haben ihn nur von unseren Nachkommen geliehen

"We need education to cope with digitalization - and NOT the digitalization of education.!"

Tägliches Stoßgebet: Oh Herr, wirf Hirn vom Himmel !

Offline dbs

  • Betatester
  • **
  • Posts: 8914
  • Gender: Male
  • tioz4ever
    • WebsiteBaker - jQuery-Plugins - Module - Droplets - Tests
Re: Drag and Drop not working in OFA when modulename contains hyphens
« Reply #6 on: October 31, 2018, 11:50:53 AM »
Quote
At least in PHP are hyphens in variable names not allowed
Therefore the info.php rename whitespaces and hyphens to underscore. But something work not right in my test.
Maybe the installer can't do it right in the zip.
Logged
https://onkel-franky.de

Offline dbs

  • Betatester
  • **
  • Posts: 8914
  • Gender: Male
  • tioz4ever
    • WebsiteBaker - jQuery-Plugins - Module - Droplets - Tests
Re: Drag and Drop not working in OFA when modulename contains hyphens
« Reply #7 on: November 01, 2018, 07:38:59 PM »
The new version 2.0.2.22 should solv the problem.
https://addon.WebsiteBaker.org/pages/en/browse-add-ons.php?id=04238F62
Logged
https://onkel-franky.de

  • Print
Pages: [1]   Go Up
  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.11.x) »
  • Modules (Moderator: Boudi) »
  • Drag and Drop not working in OFA when modulename contains hyphens
 

  • SMF 2.0.19 | SMF © 2017, Simple Machines
  • XHTML
  • RSS
  • WAP2