Bug #10064

Physical Storage still visible after unchecking from Visible Elements

Added by Sarah Romkey almost 6 years ago. Updated almost 6 years ago.

Status:VerifiedStart date:06/23/2016
Priority:CriticalDue date:
Assignee:Dan Gillean% Done:

0%

Category:Physical storage
Target version:Release 2.3.0
Google Code Legacy ID: Tested version:2.3
Sponsored:No Requires documentation:No

Description

To reproduce:

- Uncheck physical storage in the Visible Elements module
- In a logged out browser, view an archival description which has physical storage linked.

Result: Unauthenticated users can see physical storage information
Expected result: Physical storage information should be hidden from unauthenticated users

Note that I did try clearing my cache before checking.


Related issues

Related to Access to Memory (AtoM) - Bug #7850: Make sfAPCCache work with php-apcu Verified 01/21/2015

History

#1 Updated by Dan Gillean almost 6 years ago

  • Assignee set to Nick Wilkinson
  • Target version set to Release 2.3.0

#2 Updated by Nick Wilkinson almost 6 years ago

  • Assignee changed from Nick Wilkinson to José Raddaoui Marín

Hi Radda, can you take a look at this?

#3 Updated by José Raddaoui Marín almost 6 years ago

  • Status changed from New to In progress
  • Assignee changed from José Raddaoui Marín to Jesús García Crespo

It looks like an APC/APCu cache problem. And it's probably happening the same with other settings. The settings cache is not being cleared after changes and it's showing the following notice:

Jul 04 11:33:11 symfony [notice] {sfWebDebugLogger}  Notice at /home/radda/www/atom-2/vendor/symfony/lib/cache/sfAPCCache.class.php on line 150 (Undefined index: key)

https://github.com/artefactual/atom/commit/0f69c8a844a5a47db86fc85a2fd75b0246d95f27

After that commit we check if the 'apcu' extension is enabled in ...

https://github.com/artefactual/atom/blob/qa/2.3.x/vendor/symfony/lib/cache/sfAPCCache.class.php#L42

Changing the 'cache_list' key after when the settings are removed from the cache ...

https://github.com/artefactual/atom/blob/qa/2.3.x/vendor/symfony/lib/cache/sfAPCCache.class.php#L138

In my case I have the 'apcu' extension loaded but the info key is still being 'info'.

I'm using Apache2, PHP 5.5.9 and I have both modules (apc and apcu) installed

$ php -v
PHP 5.5.9-1ubuntu4.17 (cli) (built: May 19 2016 19:05:57) 
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2014 Zend Technologies
    with Zend OPcache v7.0.3, Copyright (c) 1999-2014, by Zend Technologies

$ php -m
[PHP Modules]
apc
apcu
bcmath
bz2
calendar
Core
ctype
curl
date
dba
dom
ereg
exif
fileinfo
filter
ftp
gettext
hash
iconv
json
ldap
libxml
mbstring
memcache
memcached
mhash
mysql
mysqli
openssl
pcntl
pcre
PDO
pdo_mysql
Phar
posix
readline
Reflection
session
shmop
SimpleXML
soap
sockets
SPL
standard
sysvmsg
sysvsem
sysvshm
tokenizer
wddx
xml
xmlreader
xmlwriter
xsl
Zend OPcache
zip
zlib

[Zend Modules]
Zend OPcache

So it looks like an issue between both extensions. If php 5.5 or higher is being used it should use the APCu and OPCache extensions and not APC. I've tried to uninstall php-apc but the issue keeps happening.

Sevein, as you know a lot more about this, could you take a quick look? Please, let me know if you need more info about my configuration. Thanks!

#4 Updated by José Raddaoui Marín almost 6 years ago

  • Related to Bug #7850: Make sfAPCCache work with php-apcu added

#5 Updated by David Juhasz almost 6 years ago

  • Priority changed from Medium to Critical

#6 Updated by Jesús García Crespo almost 6 years ago

  • Status changed from In progress to Feedback
  • Assignee changed from Jesús García Crespo to José Raddaoui Marín

What's the output of `phpversion('apc')` for you?
I see "4.0.2", I'm using trusty (Vagrant box) - this is still using "key" instead of "info". I'm aware that APCu fixed that problem and started using "info" but Ubuntu 14.04 never brought that from upstream. I'm assuming that the situation is the same in Ubuntu 12.04 but I'll double check.

#7 Updated by Jesús García Crespo almost 6 years ago

  • Status changed from Feedback to Code Review

Radda, what do you think of this? https://github.com/artefactual/atom/pull/402 - can you test it?

#8 Updated by José Raddaoui Marín almost 6 years ago

  • Status changed from Code Review to QA/Review
  • Assignee changed from José Raddaoui Marín to Dan Gillean

Awesome Sevein, I'm using Ubuntu 14.04 and phpversion('apc') is '4.0.7'. The fix worked for me, and I've merged it in 5829948

Thanks!

#9 Updated by Dan Gillean almost 6 years ago

  • Status changed from QA/Review to Verified

Also available in: Atom PDF