some 2.8.1 issues

crnogorac081

Web developer

doc

Hi,

Quote from: crnogorac081So now I have to wait for final 2.8.1 release to see if this script will be included or not in final package.
Or you may want to work around those issues to make your module independend from the chosen backend theme and/or WB version (2.7, 2.8 or 2.8.1). One possible example is implemented in the AFE action handler.

Doc

crnogorac081

Thanks both,

So now I have to wait for final 2.8.1 release to see if this script will be included or not in final package.

Web developer

doc

#24
Hi,

well the status is a bit complex, so I try to give a short summary.

Frontend module files
The optional Add-on files "frontend.css" and "frontend.js" are automatically loaded by WB, if the "register_frontend_modfiles" function is invoked from the index.php of the frontend template.
Note: This does not work in all module files, it just works in WB controlled files such as "view.php". So if you have a "save_my_settings.php" which does something in the frontend part of your Add-on, the frontend files will not automatically be included.

Backend module files
The optional Add-on files "backend.css" and "backend.js" are automatically loaded by WB since WB 2.7.
Note: This does not work in all module files, it just works in WB controlled files such as "include.php", "modify.php".

jquery-min.js
Automatically loaded in backend pages, which includes the theme file "footer.htt" (e.g. /template/xxx_theme/templates/footer.htt). The JS lib is included to the end of the body not in the head.
Note: while "jquery-min.js" is loaded in all themes, "jquery-ui-min.js" is not loaded automatically by all themes.

EditArea
Automatically included in the head secton of all backend pages (2.8.1). Loading mechanism was changed some times from 2.8 RC1 to 2.8.1. Latest load mechanism is to include this lib via /template/xxx_theme/templates/header.htt

Non WB controlled Add-on files
In non WB controlled Add-on files (e.g. files which take values from AJAX, Forms etc.) and save them to DB etc, the developer needs to take care that JS or CSS files are included. On possbile way of including files to non WB controlled Add-on files is shown in the AFE "action_handler.php" file (function myAdminWrapper).

Regards Doc

P.S.: The summary is by no means exhaustive. I just wanted to highlight some of the aspects. Files like the "frontend_body.js" are not even mentioned above. Maybe some aspects will be documented with the updated WB help site :wink:

Luisehahne

It was comment out, because actuelly it is not used, and decrease traffic (188kb by loading a page)

Dietmar
Note: Once the code has been generated, it is easy to debug. It's not a bug, it's a feature!

crnogorac081

Lets just not open wide discussion here.

I just wanted to know why the jquery-ui-min.js exists in WB 2.8.0 Stable version in Backend theme (argos_theme) in Footer.htt file and in WB 2.8.1 RC3 and latest SVN this file is removed (commented) and is there some specific reason (for example some incompatibility or whatever...) that developers spoted, so they removed it from loading..

thats all..

Ivan
Web developer

Argos

Well, next Argos theme version uses jQuery anyway, and that will very probably be part of WB2.8.2. So I guess the jQuery core and jQuery UI will be part of the backend by default then. But I'm just a simple backend theme guy, not one of the developes, so they may come up with another way of using jQuery in the backend than the one I'm testing now.
Jurgen Nijhuis
Argos Media
Heiloo, The Netherlands
----------------------------------------------------------------
Please don't request personal support, use the forums!

Stefek

Quote from: Argos on February 06, 2010, 01:26:54 PM
<!--
<script src="{WB_URL}/include/jquery/jquery-ui-min.js" type="text/javascript"></script>
-->


is there for the next version, but not actually used yet in this (RC) version. Therefore it's commented.

That's good news, Jurgen.
I hope it will turn back into the Backend Themes (all).

Kind Regards,
Stefek
[i]"Gemeinsam schafft man mehr."[/i]

[b][url=http://duden.de/rechtschreibung/gemeinsam#Bedeutung1]gemeinsam[/url][/b]
1. mehreren Personen oder Dingen in gleicher Weise gehörend, eigen
2. in Gemeinschaft [unternommen, zu bewältigen]; zusammen, miteinander
#Duden

Stefek

Quote from: maverik on February 06, 2010, 01:39:09 PM
@stefek

i think your opinion is " i dont know what it is but i´m against it"

read, learn and understand jquery and what to do with it
Maverik,
you don't know what I am doing with jQuery, right?

I know about the insertion possibilities very well and used it to load further JS on demand in modules allready.

But it shouldn't be done with the UI from inside the modules (think of multiple sections with different modules).

There is no reason to comment the UI out of the Backend.
It's useful at many places and it has to be loaded only once.

My approach for the frontend (not the backend) is totaly different as yours.
But this has nothing to do in this thread.

Stefek

[i]"Gemeinsam schafft man mehr."[/i]

[b][url=http://duden.de/rechtschreibung/gemeinsam#Bedeutung1]gemeinsam[/url][/b]
1. mehreren Personen oder Dingen in gleicher Weise gehörend, eigen
2. in Gemeinschaft [unternommen, zu bewältigen]; zusammen, miteinander
#Duden

maverik

@stefek

i think your opinion is " i dont know what it is but i´m against it"

read, learn and understand jquery and what to do with it

Argos

<!--
<script src="{WB_URL}/include/jquery/jquery-ui-min.js" type="text/javascript"></script>
-->


is there for the next version, but not actually used yet in this (RC) version. Therefore it's commented.
Jurgen Nijhuis
Argos Media
Heiloo, The Netherlands
----------------------------------------------------------------
Please don't request personal support, use the forums!

Stefek

That's a real wired aspect.
Per default ALL the jQuery has to be loaded in frontend, but not in the backend, where it's more needed.  :-D

Sorry, could not resist... :-D

Come on guys, it worked well with 2.8.0, why delete it in 2.8.1, hm?
[i]"Gemeinsam schafft man mehr."[/i]

[b][url=http://duden.de/rechtschreibung/gemeinsam#Bedeutung1]gemeinsam[/url][/b]
1. mehreren Personen oder Dingen in gleicher Weise gehörend, eigen
2. in Gemeinschaft [unternommen, zu bewältigen]; zusammen, miteinander
#Duden

crnogorac081

Web developer

maverik

#14
what i want to say is that your script should work alone in all wb backend themes, not every backend theme has ui.js includet...i hope you understand my poor english

Quotehow to insert it..?


$(document).ready(function()
{
$.insert(WB_URL+'/path/to/your/script.js');
});


therefore jquery-min.js and jquery-insert.js must be loadet

crnogorac081

#13
@Luisehahne

how to insert it..?
The script needs to be in backend footer.htt file
@maverik

It worked fine in WB 2.8 stable, and in 2.8 RCxxx the same jquery script is dissabled (commented) I couldnt figure out this untill recently..
Web developer

Luisehahne

Ok, i understand, so you need the ui-min.js. Better to insert the ui-min.js, by your script with insert.js, so you can too use it with other themes

Dietmar

Note: Once the code has been generated, it is easy to debug. It's not a bug, it's a feature!

maverik

i can´t understand, when you create a own script then it isn´t an 2.8.1 issue. i think your script needed ui.js und so you must insert ui.js in your script...   :? :?

crnogorac081

I am not talking about drag and drop for pages (they are not using jquery interface for drag n drop), I am takling about I created srcipt to reorder items via drag n drop for members module, bakery...and I will do it for more modules..

I am using argos theme, and there this script is in comment lines. I see that wb_theme is not calling that script.

Sorry if I wasnt clear in my first post about drag n drop.
Web developer

maverik

Quotecould anyone remember why this script is commented?

you don´t need ui.js for drag and drop

it works wonderful with commented line for me and in wb theme there isn´t a line like this

crnogorac081

Tnx for tips guys,

I downlaoded latest SVN, and I found why drag n drop is not working:

In argos theme, in footer.htt this script is commented... When I uncomment it, it works..

<!--
<script src="{WB_URL}/include/jquery/jquery-ui-min.js" type="text/javascript"></script>
-->


I couldnt find any ticket for this, could anyone remember why this script is commented?
Web developer

doc

Hi,

and if you use a client like Tortoise SVN to fetch the latest WB version from SVN, you also need a download URL:
http://svn.websitebaker2.org/branches/2.8.x

Doc

kweitzel

It is better though to make an svn export, so the svn properties are set as well. That makes troubleshooting later down the line a bit more easy. Or, if you can wait a bit more, the 2.8.1 release is not long to go anymore.

A popular client for Windows is available at http://tortoisesvn.net/ ...

cheers

Klaus

maverik


crnogorac081

So far I never had problems with SQL, this is wb portable server from mr-fan. I have over 10 WB sites there and I never had a single DB error.

SVN 1274 is WB 2.8.1 RC3 from AMASP site. Where can I get latest revision?
Web developer

maverik

it makes no sense to search for a bug in a outdatet version of WebsiteBaker. other problem maybe is your mysql version. i know that MySQL 5.0.41-community-nt was a very buggy version. so upgrade your mysql und try again with the latest svn from wb.
everything will be allright :-D :-D