Menu
SuiteCRM dedicated support by SalesAgility
Welcome, Guest
Username: Password: Remember me

TOPIC: Bug in editing dashlets when installing suitecrm on PHP 7

Bug in editing dashlets when installing suitecrm on PHP 7 7 months 1 week ago #57528

  • taher
  • taher's Avatar
  • Offline
  • New Member
  • Posts: 16
  • Karma: 0
I've spent a countless hours investigating this issue without success. To summarize, I have the following two environments that are identical except for the PHP version:

environment 1: I install suitecrm on PHP 5.6 with apache on linux
environment 2: I install suitecrm on PHP 7.0 with apache on linux

The other libraries / requirements are exactly the same on both environments, yet no matter what I do, or whatever I install, I can never edit the dashlets on the PHP 7 environment. The moment I click edit on any dashlet I get an error message "There was an error handling this request". Checking the logs of both suitecrm and apache I got no errors.

For completeness, I am showing below the exact docker built script I'm using to try and deploy suitecrm:

FROM debian:9

ARG APP_VERSION=7.9.8
ARG ARCHIVE=v${APP_VERSION}.zip
ARG EXTRACT_DIR=SuiteCRM-${APP_VERSION}
ARG WWW_DIR=/var/www/html

ADD github.com/salesagility/SuiteCRM/archive/${ARCHIVE} /tmp
COPY init.sh /usr/local/bin/init.sh

RUN apt-get update && apt-get upgrade -y \
&& apt-get install -y \
apache2 \
cron \
libapache2-mod-php7.0 \
php7.0-curl \
php7.0-gd \
php7.0-gettext \
php7.0-imap \
php7.0-json \
php7.0-mbstring \
php7.0-mysql \
php7.0-xml \
php7.0-zip \
unzip \
zip \
&& rm -rf /var/lib/apt/lists/*

WORKDIR /tmp

RUN unzip ${ARCHIVE} && \
rm ${ARCHIVE} && \
rm -rf ${WWW_DIR}/* && \
cp -R ${EXTRACT_DIR}/* ${WWW_DIR}/ && \
rm -rf ${EXTRACT_DIR} && \
chown -R www-data:www-data ${WWW_DIR} && \
chmod +x /usr/local/bin/init.sh && \
(crontab -l 2>/dev/null; echo "* * * * * cd /var/www/html; /usr/bin/php -f cron.php > /dev/null 2>&1") | crontab -u www-data -

COPY php.ini /etc/php/7.0/apache2/php.ini

WORKDIR ${WWW_DIR}

EXPOSE 80 443

CMD ["init.sh"]
The administrator has disabled public write access.

Bug in editing dashlets when installing suitecrm on PHP 7 7 months 1 week ago #57529

  • taher
  • taher's Avatar
  • Offline
  • New Member
  • Posts: 16
  • Karma: 0
also forgot to mention that this thread is related to 57523
The administrator has disabled public write access.

Bug in editing dashlets when installing suitecrm on PHP 7 6 months 1 day ago #59835

  • garlick
  • garlick's Avatar
  • Offline
  • New Member
  • Posts: 10
  • Karma: 0
Hi taher, did you ever figure this out? I saw your messages in the other thread, but no follow-up by anyone who might have a solution. I'm having the exact same problem; I can't edit any of the dashlets. Here's my reply in that thread:

suitecrm.com/suitecrm/forum/suitecrm-7-0...ities?start=15#59709

I'd really like to get this fixed. I can somewhat work around it by going directly to the Contacts (or whatever) page and doing the edit from there, but it's very inefficient.

Thanks.
The administrator has disabled public write access.

Bug in editing dashlets when installing suitecrm on PHP 7 6 months 1 day ago #59836

  • taher
  • taher's Avatar
  • Offline
  • New Member
  • Posts: 16
  • Karma: 0
Hi Garlick

So despite my best efforts, I was unable insofar to make suitecrm work with PHP 7 no matter how hard I try. The folks from suitecrm seem to have got it working on their demo account on PHP 7 (I think) so it must be some hidden dependency or a library I'm unaware of.

I checked every log, ran dozens of docker builds with different settings, all from scratch, without success. Either the documentation is missing some critical dependency or something else in the environment must be set. Unfortunately, no luck in figuring this out so far.
The administrator has disabled public write access.

Bug in editing dashlets when installing suitecrm on PHP 7 6 months 1 day ago #59838

  • garlick
  • garlick's Avatar
  • Offline
  • New Member
  • Posts: 10
  • Karma: 0
Hi taher, that's unfortunate.

I tried changing PHP to 5.6 (from 7.0) but it didn't affect the behavior at all, although I understand that it did for you. I cleared my browser's cache after making the change, but I still get these error messages in error_log whenever I click on a dashlet's pencil button:

[13-Feb-2018 13:19:47 America/Chicago] PHP Strict Standards: Declaration of SugarWidgetFieldDateTime::displayInput() should be compatible with SugarWidgetField::displayInput($layout_def) in /home2/garlick/public_html/SuiteCRM-7.9.12/include/generic/SugarWidgets/SugarWidgetFielddatetime.php on line 45
[13-Feb-2018 13:19:47 America/Chicago] PHP Strict Standards: Declaration of SugarWidgetFieldVarchar::displayInput() should be compatible with SugarWidgetField::displayInput($layout_def) in /home2/garlick/public_html/SuiteCRM-7.9.12/include/generic/SugarWidgets/SugarWidgetFieldvarchar.php on line 106
[13-Feb-2018 13:19:47 America/Chicago] PHP Strict Standards: Declaration of SugarWidgetFieldName::queryFilterone_of() should be compatible with SugarWidgetFieldVarchar::queryFilterone_of(&$layout_def) in /home2/garlick/public_html/SuiteCRM-7.9.12/include/generic/SugarWidgets/SugarWidgetFieldname.php on line 288
[13-Feb-2018 13:19:47 America/Chicago] PHP Strict Standards: Declaration of SugarWidgetFieldName::displayList() should be compatible with SugarWidgetField::displayList($layout_def) in /home2/garlick/public_html/SuiteCRM-7.9.12/include/generic/SugarWidgets/SugarWidgetFieldname.php on line 288
The administrator has disabled public write access.

Bug in editing dashlets when installing suitecrm on PHP 7 6 months 1 day ago #59839

  • garlick
  • garlick's Avatar
  • Offline
  • New Member
  • Posts: 10
  • Karma: 0
BTW, the one exception is the My History dashlet; the pencil icon works for that one, but not for Accounts, Contacts, Leads, Top Ten Opportunities, Meetings, or Calls dashlets.
The administrator has disabled public write access.

Bug in editing dashlets when installing suitecrm on PHP 7 6 months 1 day ago #59840

  • taher
  • taher's Avatar
  • Offline
  • New Member
  • Posts: 16
  • Karma: 0
Yeah same with me, only the history dashlet works. Interesting, at least you got errors in your log!

Are you trying from scratch? Perhaps you can check the SugarWidgetFielddatetime.php .. perhaps you can review the dependencies from that file by looking at the imported libraries.
The administrator has disabled public write access.

Bug in editing dashlets when installing suitecrm on PHP 7 6 months 1 day ago #59841

  • taher
  • taher's Avatar
  • Offline
  • New Member
  • Posts: 16
  • Karma: 0
I have a feeling it could also be a php.ini settings, since it mentioned something about strict mode.
The administrator has disabled public write access.

Bug in editing dashlets when installing suitecrm on PHP 7 6 months 1 day ago #59859

  • samus-aran
  • samus-aran's Avatar
  • Offline
  • Administrator
  • Posts: 310
  • Thank you received: 136
  • Karma: 36
Hello!

On our demo instance we run 7.1 and 7.2 for our tests. I wouldn't think it would be specific to 7.0 but something we may need to look into.

BUT you could be onto something there taher about the strict. The latest PHP versions will execute a failure if there are any strict error logs in the application. What I would recommend is to reduce the error_reporting by adding & ~E_STRICT to it. If you wanted to go a step further you could hide deprecated & ~E_DEPRECATED

Remember to save, restart and watch the logs :)

Let us know how you get on.
..........

SalesAgility - the authors and maintainers of SuiteCRM
Get Involved! Help contribute to the SuiteCRM documentation site.
The administrator has disabled public write access.

Bug in editing dashlets when installing suitecrm on PHP 7 6 months 17 hours ago #59887

  • garlick
  • garlick's Avatar
  • Offline
  • New Member
  • Posts: 10
  • Karma: 0
I was actually playing with this yesterday, but I'm not a PHP programmer so I don't think I'm doing it quite right. I don't have access to the system-wide php.ini file (I'm on a. shared hosting platform at hostgator), but I tried modifying index.php in the SuiteCRM home directory. I tried this:

error_reporting(E_ALL ^ E_STRICT);

and:

error_reporting(E_ALL & ~E_STRICT);

I wrote the file (using vi) and then reloaded the Dashboard page, but it didn't affect anything. You did say to restart though; how do I do that? Maybe that's the piece that I'm missing.

Thanks,

-Tim.
The administrator has disabled public write access.

Bug in editing dashlets when installing suitecrm on PHP 7 5 months 3 weeks ago #60031

  • taher
  • taher's Avatar
  • Offline
  • New Member
  • Posts: 16
  • Karma: 0
A restart means simply restarting the web server so that changes to PHP settings are reloaded. A reboot would have the same effect.
The administrator has disabled public write access.

Bug in editing dashlets when installing suitecrm on PHP 7 4 months 3 weeks ago #62316

  • upgrade360
  • upgrade360's Avatar
  • Offline
  • New Member
  • Posts: 4
  • Karma: 0
We are also suffering from this issue. Going to make the PHP changes suggested above and see if that fixes it.
The administrator has disabled public write access.
Time to create page: 0.129 seconds
Powered by Kunena Forum