xoops forums

Forum Index


Board index » All Posts (geekwright)




geekwright

Quite a regular
Posted on: 2018/12/4 17:38
geekwright
geekwright (Show more)
Quite a regular
Posts: 251
Since: 2010/10/15
#1

Re: FOREIGN KEY

Since the SqlUtility class doesn't recognize the table name in the REFERENCES clause, you will have to add the constraint outside of the module's mysql.sql file.

I would suggest generating and running the SQL to perform an "ALTER TABLE ... ADD FOREIGN KEY ..." inside the onInstall file's xoops_module_install_dirname() function.

Longer term, this should become a non-issue as we progress toward schema definitions rather than SQL for table creation.


geekwright

Quite a regular
Posted on: 11/12 2:18
geekwright
geekwright (Show more)
Quite a regular
Posts: 251
Since: 2010/10/15
#2

Re: Error in animal pedigree software Error : Handler does not exist

I suspect the clue is in the module name, "pedigree-master".

That is the name GitHub assigns to the download, and unfortunately it is wrong. The directory name for the module should be just "pedigree".

- Uninstall the module pedigree-master
- Rename the directory from pedigree-master to pedigree
- Install the module pedigree

That should solve the issue. Mamba is the expert on pedigree, and I'm sure he will chime if there are any further issues..


geekwright

Quite a regular
Posted on: 11/11 20:45
geekwright
geekwright (Show more)
Quite a regular
Posts: 251
Since: 2010/10/15
#3

Re: Internal Error - Upgrade from 2.3.3b to 2.5.8

Quote:

stonez wrote:
...
2. PiCal module: Error: Call to undefined function ereg()
...


The whole family of ereg functions were removed in PHP 7. They had been deprecated since PHP 5.3.

Here is a stackoverflow explanation and recipe for replacing ereg():
https://stackoverflow.com/questions/62 ... xpressions-to-preg-in-php


geekwright

Quite a regular
Posted on: 11/10 19:55
geekwright
geekwright (Show more)
Quite a regular
Posts: 251
Since: 2010/10/15
#4

Re: Internal Error - Upgrade from 2.3.3b to 2.5.8

The most likely cause of the error is some code in an old module which includes the phrase:
=& new

An example of this would look something similar to:
$object =& new ClassName();


That syntax was deprecated in PHP 5, but is now an error in PHP 7. The "=&' is assigning a value by reference, but the return of "new" is already a reference. Remove the "&" and that should fix it.

It would be worth checking to see if any PHP 7 ready upgrades are available for any modules you may be using.


geekwright

Quite a regular
Posted on: 10/17 15:21
geekwright
geekwright (Show more)
Quite a regular
Posts: 251
Since: 2010/10/15
#5

Re: How to install a xoop back up on xampp local host

Install your stack (i.e. XAMPP or WAMP) and make sure it is working first.

Here is a section of the installation manual dealing with moving a site:
https://github.com/XoopsDocs/xoops-2.5 ... ree/master/en/book/moving

You can follow those instruction to adapt your backup files to the local environment.


geekwright

Quite a regular
Posted on: 10/16 22:29
geekwright
geekwright (Show more)
Quite a regular
Posts: 251
Since: 2010/10/15
#6

Re: Smarty 3.1.33

There are some potential issues. These are the main ones:

1) Since we expose Smarty directly, the BC layer for v2 would be required. It is good, but not 100% perfect. Alone, this would probably not be a blocker, but it could break previously working code.

2) Due to changes in parsing, things as simple as extra spaces or missing quotes may cause unintended results or errors in some circumstances. These were harmless in v2.

3) Many XOOPS templates have historically relied on an unassigned variable to evaluate as false. While this may still work, it will produce error messages, sometimes in log file filling quantities..

The code and templates included in XOOPS and the more actively maintained modules have some of these possible errors corrected already. There are, however more modules, and even more templates and themes that may never have been checked. Those are the ones that may break sites which have worked for years on upgrading.

With the 2.5 series, we want to encourage upgrades especially for security reasons. Adding features we suspect may cause issues is something we want to avoid if at all possible. The next generation XOOPS will include the latest Smarty, and as a major upgrade, the BC issues will be expected, acceptable and documented.


geekwright

Quite a regular
Posted on: 9/4 15:33
geekwright
geekwright (Show more)
Quite a regular
Posts: 251
Since: 2010/10/15
#7

Re: "The page isn’t redirecting properly" when non-admin (UID not 1) logged in

Quote:

rossb wrote:
...
@geekwright Is this your patch?
redirect_header(XOOPS_URL . "/user.php", 1, _NOPERM, false);


Yes. That fixes the bug regarding the infinite redirection loop related to permissions to the start module.

It doesn't fix any underlying permission issues. Some known issues are handled in upgrade, but there can be problems since a lot has changed over time.

Bill, just out of curiosity, what was the version of the "antique xoops?"


geekwright

Quite a regular
Posted on: 9/3 20:06
geekwright
geekwright (Show more)
Quite a regular
Posts: 251
Since: 2010/10/15
#8

Re: "The page isn’t redirecting properly" when non-admin (UID not 1) logged in

This code is only used when a "Module for your start page" is specified. The permissions, either the group's "Module Access rights" for that start page module , or for the initial page content in the start page module is not allowing access.

There is an error in the redirect logic, but the group permissions for the module are what is preventing access. Make sure the registered user group has permissions to access the start module and it should work.

I will put in a patch for the redirect. It should redirect to user.php instead of to the start page.


geekwright

Quite a regular
Posted on: 8/7 3:03
geekwright
geekwright (Show more)
Quite a regular
Posts: 251
Since: 2010/10/15
#9

Re: Install xoops 2.6 :: Endroid Installer did not detect a compatible project type

This works fine (just tested on Ubuntu 18.04):

git clone https://github.com/XOOPS/XoopsCore.git yourdir
cd yourdir
cp composer
.json.dist composer.json
./xoops_lib/composer.phar self-update
./xoops_lib/composer.phar install


You should not be in xoops_lib when you run composer install. Also, XoopsCore does not contain a composer.lock file, so you might have better results starting from a fresh clone.

Installing composer globally is preferred over depending on the included composer.phar, but for now it will work if updated.

The message "Endroid Installer did not detect a compatible project type" is just informational. It is telling you that it didn't find a Symfony project to add itself to, which is as it should be.

For now, XoopsCore is targeted to developers only, and it is expected that developers have or will build their own proficiency with composer.


geekwright

Quite a regular
Posted on: 7/18 3:00
geekwright
geekwright (Show more)
Quite a regular
Posts: 251
Since: 2010/10/15
#10

Re: set class for form elements

\XoopsFormRendererInterface defines the interaction between the business logic supplied by form elements and the presentation layer rendering of those elements. All HTML generated by core form and form element classes is done by an implementation of \XoopsFormRendererInterface.

\XoopsFormRendererBootstrap3 is a component supplied with core that provides a concrete implementation of \XoopsFormRendererInterface. A theme may optionally use that component. If the theme does not explicitly specify an implementation of \XoopsFormRendererInterface to use, the rendering choice will default to \XoopsFormRendererLegacy, which closely mimics the HTML generated in pre-2.5.9 form elements.

The separation through the interface makes the HTML generation the responsibility of the presentation layer, more specifically the theme. New and different renders are possible and expected, even for frameworks that have not been written yet.

To complete the separation, we need to stop passing the presentation detail directly from the business logic. This kind of detail belongs in the template where it can be adjusted by theme.

$( document ).ready(function() {
    $(
'#myspecialbutton').addClass('btn-success').removeClass('btn-default');
});



TopTop
(1) 2 3 4 ... 16 »