Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [php]

PHP is a server-side scripting language designed for web development but also used as a general-purpose programming language. Joomla is based on PHP.

1
vote
1answer
30 views

Joomla.submitbutton is not a function at HTMLButtonElement.onclick

I have been facing a problem when I try to update the article from the frontend then it shows this error Joomla.submitbutton is not a function at HTMLButtonElement.onclick Here is my code &...
1
vote
1answer
186 views

Search in custom component

How can I improve the Search component in joomla 2.5 to set search by my custom component? Can't find, where I can modify the search request to database. UPDATE: With help of Rene Korss I solve the ...
0
votes
1answer
16 views

Using a custom field with different names

I want to use a flexible field name for a field across different forms thru my extension. My custom example field looks like this: defined('_JEXEC') or die; use Joomla\CMS\Factory; use Joomla\CMS\...
0
votes
1answer
16 views

CheckToken() error when TinyMCE init

I have a form, which add some data to DataBase. <form> <input type="text" name="mydata" /> <textarea name="mytext"></textarea> <?php echo JHtml::_( 'form.token' );?> ...
0
votes
1answer
47 views

Hikashop, extract text after read more

I want to have the introtext and then the rest of the text in Hikashop product details page. So in the product description I insert the <hr id="system-readmore" /> to separate the introtext and ...
0
votes
1answer
33 views

How can I prevent Joomla from removing octothorpe/pound from URL post login?

For example, I would like to send the following links in an email to users: https://www.example.com/#foo https://www.example.com/deep-link/#foo When clicked on, I get the following results: https://...
0
votes
1answer
102 views

Parsing Error Javascript in php include page on the test server

We're getting this error in our test environment: Parse error: syntax error, unexpected 'var' (T_VAR) in /home/usaspo5/public_html/dev/usgnew/components/com_usg_programs/tmpls/default.php We have ...
0
votes
1answer
251 views

Implement Joomla 3 registration field with jquery autocomplete

I want to implement a field with jquery autocomplete the code: <!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <title></title> <link rel="...
0
votes
1answer
386 views

Display Image via Imagick

I would like to display an image which is not accessible for users (.htaccess denies all). This is my source: header('Content-Type: image/png'); $filePath = ...
0
votes
1answer
49 views

Custom module: JSession brokes the site

I am making custom shop module for my website and my script breakes all pages where it is. The command what breaks it is: $session =& JFactory::getSession(); (Code putted in default.php). I cant ...
-1
votes
1answer
182 views

Problems When I change my PHP version to 7.2(Error 0 Using $this when not in object context )

I have my website in production now, The site works very good with PHP 5.6 and 7.0 but When I try to change the PHP version to 7.2 the website doesn't work. It shows me an error message like this: I'...
-1
votes
1answer
46 views

Virtuemart 3.4 - products on manufacturer page

Virtuemart 3.4.2, joomla 3.8 i try copy code from category template, but cant fix this errors: at /my_template/html/com_virtuemart/manufacturer/details.php NOW I HAVE Two ERRORS: Call to a member ...
-1
votes
1answer
31 views

Joomla / PHPMyAdmin bug when “select” is in the value

This question was originally asked on StackExchange, and it was recommended by @mickmackusa that I ask it here. Background We recently changed over from one server to a brand new one. Old server: ...
1
vote
0answers
12 views

mklink and JFolder: :folder: Path is not a folder [due to is_dir()]

Joomla is on Win2012 R2, XAMPP, Fabrik. I created a symlink like so: C:\Users\Administrator>mklink /D "C:\xampp\htdocs\pdf" "Z:\" symbolic link created for C:\xampp\htdocs\pdf <<===>> ...
1
vote
0answers
19 views

How to configure PHP basedir for Joomla running on IIS shared hosting

I have the following setup: IIS 10 with Plesk Onyx 17.8.11. Joomla 3.8.13/PHP 7.2.10. The website is hosted in shared hosting provider. After installing Gantry 5 I get the following warning on the ...
1
vote
0answers
166 views

joomla make a ajax request for another php file

Excuse me for my English. I'm a newbie in joomla. I make a phone book component and i wanna add a Ajax pagination. I've got Jquery function load_data where i put a url to my php page. And this is ...
1
vote
0answers
108 views

How to upload an image using Ajax?

I need to upload an image to the server via AJAX, but the server comes back to the page with request, although server doesn't send anything. ajax: function uploadServer($el) { var fileUpload = $...
1
vote
0answers
335 views

Saving custom field parameter value from module settings

I know well how to create custom form field in joomla module settings as written in the accepted answer of this question which is basically extending JFormField class. Now what i want to do is ...
1
vote
0answers
204 views

RSForms - Change the items of a radio group based on a selection of a drop down

I need to change the items of a radio group based on a drop-down selection in RSForm pro. Right now I'm using the Conditional Fields feature to show different radio group field and that caused too ...
1
vote
0answers
362 views

Retrieving data from Joomla! Subform form field type

I'm trying to retrieving data from Joomla! Subform form field type, Here what I have: <fieldset name="item_lists" label="Item List"> <field name="ilist" type="subform" ...
1
vote
0answers
155 views

Joomla 3.5.1 - Ajax with PHP not send email

I'm having some problems with the action of an Ajax form. Here is the Javascript: <script type="text/javascript"> var $j = jQuery.noConflict(); $j(document).ready(function() { $j(...
1
vote
0answers
165 views

Why use ob_start and eval instead of using a simple include in this Joomla Plugin?

I was looking at the code of a Plugin for Joomla! CMS for a functionality I need: the possibility to run custom PHP scripts when a Joomla! Plugin/Events is fired. I wanted to learn the mechanism used ...
1
vote
0answers
77 views

Joomla Checking out items does not work correctly

I would like to check out items, that are edited by user XYZ. Well, it works so far: If somebody opens an item, the default-view shows the "lock" icon. But: If I click the link to the checked out ...
1
vote
0answers
230 views

Achieve k2 item SEF URLS

I am working on Joomla! and I am trying to retrieve the sef URL of k2 item. I try to make it outside of the k2 on other component. So I have right on function, it makes a sef URL with the item but ...
1
vote
0answers
736 views

Send data from custom field to database - Joomla 2.5

I've created a custom field for a module which gets some information from the database. I need to add the functionality to update the information in database if I make some changes. Here is the code ...
0
votes
0answers
61 views

Error: Cannot access protected property Joomla\CMS\Menu\AbstractMenu::$User

randomly tried to access the production site this morning and came across the following error immediately after logging in. I cannot navigate past it and if i hit return to control panel i am ...
0
votes
0answers
74 views

How to create a Joomla MVC for consuming a RESTful API

I'm looking for some help with writing a Joomla MVC which will consume a RESTful API. The API returns data in JSON and XML. The component should have two views (a frontend list with all objects - ...
0
votes
0answers
28 views

Select file stored on web server and send as attachment in email?

I was hoping someone could help me/guide me in the right direction with this issue. I want to create a button called "Send File". When this button is clicked, a directory on my web server is opened ...
0
votes
0answers
153 views

How to redirect a different url using Controller page

After submitting a form, the page refresh with a thank you message. So how can I redirect that page to a different url after successfully submitting the form. Current Form codes are as following: &...
0
votes
0answers
54 views

How to fetch data from database in a function of helper.php file of joomla module

I am new to joomla. I have developed a simple module. I need to fetch data from database in a function of helper.php. I am using $db = JFactory::getDbo(); But it giving fatal error Uncaught Error:...
0
votes
0answers
52 views

echo sorting direction without grid.sort on selected column

using JHTML grid.sort I can sort the columns but I want to sort without this <?php echo JHTML::_( 'grid.sort', JText::_('lastName'), 'lastName', $this->sortDirection, $this->sortColumn); ?&...
0
votes
0answers
13 views

Disable user from adding to cart based on certain condition

I basically need to disable a user from adding a product to the cart, IF another product with a different "customfield_value" than the one already in the cart, tries to be added by the user. Let's ...
0
votes
0answers
58 views

Form submission on joomla module backend

Created a module and added a form on backend with submit button using custom form field as below public function getInput() { return '<form action="http://localhost/joomla/payment" method="...
0
votes
0answers
50 views

How to remove joomla alert error

I have a plugin that displays custom alert / warning / info messages however if the page uses ajax for instance for my login, the plugin causes a dialog alert pop up box which says "error unable to ...
0
votes
0answers
73 views

Query params not passed to redirection URL from joomla login “return” varibale

I am using a overide in template for my login module in joomla. I changed return value in the login form to a new redirection URL , which has query parameters along. This was working fine till I ...
0
votes
0answers
371 views

Some joomla versions not running in latest xampp environment

Hi I backed up a joomla 3.0 site from production server with database backup too. I was using xampp 1.8 version which is old and everything was fine when i set up that joomla site under xampp(...
0
votes
0answers
629 views

“PHP Fatal error: Call to a member function get() on a non-object” in K2 Template

On December 8, I first received this error on a site I manage: [08-Dec-2016 13:38:28 America/Detroit] PHP Fatal error: Call to a member function get() on a non-object in /path/to/site/templates/...
0
votes
0answers
111 views

How to display the full view of a ZOO type with PHP?

I'm working with Joomla 3.6 and the ZOO component. I have the following ZOO structure: APP: Customer TYPE: Investor Template Layout: Full ZOO item (Investor type): John Doe My goal: If the John Doe ...
0
votes
0answers
468 views

Displaying submenu on hover for a top menu item

I am trying to build a submenu for a top menu item from admin side as shown in the tutorial below. https://docs.joomla.org/Creating_a_submenu After completing the list of steps, i see that my ...
0
votes
0answers
544 views

PHP Warning: file_get_contents() in error_log

I used OSTraining's instructions to Create a Custom Joomla 404 Page with 404 Status Code in one of my J! 3.5.1 sites. However, the error_log is flooded with the following errors: [09-Jun-2016 04:05:...
0
votes
0answers
391 views

Joomla - Custom form in default.php

I have a question about a form created in default.php (product details of virtuemart). Now my action of my form is this: form name="myform" id="jvcontact95" method="post" action="?php echo JRoute::_('...
0
votes
0answers
671 views

PHP5 to PHP7 Call to undefined method ControllerModulequicksearchmodule::render()

I have a module that worked with PHP5 but after upgrading to PHP7 the module is no longer working and I get the error Call to undefined method ControllerModulequicksearchmodule::render() The code ...
0
votes
0answers
33 views

When I redirect a user to another component in the page, he is logged out. Why is this happening? Help.

I would like to know why a user gets logged out after being redirected to another url, still in the same browser, and no new page. His session get cleared too. Am usinng joomla 1.5 ie <a href="...
0
votes
0answers
105 views

In “Date Format” section, what code makes the date relative?

This code will show the date of publishing like: 4:30 10/7/2015 I want the date be like: 2 hours and 15 minutes ago this setting is on showcase modules ("news show pro GK4" in this case) for ...
0
votes
0answers
72 views

Access k2 extra field from Flexi Code module

I am using the Flexi Code module to display some php in a k2 page. This k2 page has a RoomID as extra field. How can I access it as a variable inside Flexi Code?
0
votes
0answers
92 views

Joomla 1.5 creating or editing back end user

I have a website in joomla , the problem is that when i am creating new back end user (administrator/super user) from joomla user manager it makes an entry in the users table after that it deleted it ...
0
votes
0answers
136 views

T3 Framework extrafields error retrieving Values

i am using the T3 Framework for my template and did everything as described in the forum. Everything is working in the backend but i am not able to retrieve the values in the frontend. I am getting a ...
0
votes
0answers
177 views

User Extended Fields Problem

I'm new with PHP and I'm developing a website with joomla 3. I have a module which is k2 users where I show all k2 users, well, I want to add to this module some fields from the User Extended Fields ...
-1
votes
0answers
12 views

Post variables not working properly in form

I have some very simple code is executed via Sourcerer: <form action="" method="GET"> <input type="text" name="ALL"> <input type="submit" value = "Search"> </form> <...
-1
votes
0answers
21 views

What is the best way to verify user through Joomla Ajax

How can I verify Username and Password using Joomla! default login module though Ajax request? I don't need Ajax login, What I need is- Check entered username and password on a Button click within ...